1#![allow(non_camel_case_types,non_upper_case_globals,unsafe_op_in_unsafe_fn,unused_imports,unused_variables,unused_assignments,unused_mut,clippy::approx_constant,clippy::enum_variant_names,clippy::let_unit_value,clippy::needless_return,clippy::too_many_arguments,clippy::unnecessary_cast,clippy::upper_case_acronyms)]
4
5use crate::codegen::GenericBindings::ElementBinding::Element_Binding;
6use crate::codegen::GenericBindings::EventTargetBinding::EventTarget_Binding;
7use crate::codegen::GenericBindings::HTMLElementBinding::HTMLElement_Binding;
8use crate::codegen::GenericBindings::NodeBinding::Node_Binding;
9use crate::import::base::*;
10
11pub use self::HTMLFieldSetElement_Binding::{Wrap, HTMLFieldSetElementMethods, GetProtoObject, GetConstructorObject, DefineDOMInterface};
12pub mod HTMLFieldSetElement_Binding {
13use crate::codegen::GenericBindings::ElementBinding::Element_Binding;
14use crate::codegen::GenericBindings::EventTargetBinding::EventTarget_Binding;
15use crate::codegen::GenericBindings::HTMLElementBinding::HTMLElement_Binding;
16use crate::codegen::GenericBindings::NodeBinding::Node_Binding;
17use crate::import::module::*;
18
19unsafe extern "C" fn get_disabled<D: DomTypes>
20(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
21 let mut result = false;
22 wrap_panic(&mut || result = (|| {
23 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
24 let this = &*(this as *const D::HTMLFieldSetElement);
25 <D as DomHelpers<D>>::push_new_element_queue();
26
27 let result: bool = this.Disabled();
28 <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
29
30
31 (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
32 return true;
33 })());
34 result
35}
36
37unsafe extern "C" fn set_disabled<D: DomTypes>
38(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
39 let mut result = false;
40 wrap_panic(&mut || result = (|| {
41 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
42 let this = &*(this as *const D::HTMLFieldSetElement);
43 let arg0: bool = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
44 Ok(ConversionResult::Success(value)) => value,
45 Ok(ConversionResult::Failure(error)) => {
46 throw_type_error(cx.raw_cx(), &error);
47 return false;
48
49 }
50 _ => {
51 return false;
52
53 },
54 }
55 ;
56 <D as DomHelpers<D>>::push_new_element_queue();
57
58 let result: () = this.SetDisabled(arg0);
59 <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
60
61
62 true
63 })());
64 result
65}
66
67
68static disabled_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
69
70pub(crate) fn init_disabled_getterinfo<D: DomTypes>() {
71 disabled_getterinfo.set(JSJitInfo {
72 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
73 getter: Some(get_disabled::<D>)
74 },
75 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
76 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
77 },
78 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
79 _bitfield_align_1: [],
80 _bitfield_1: __BindgenBitfieldUnit::new(
81 new_jsjitinfo_bitfield_1!(
82 JSJitInfo_OpType::Getter as u8,
83 JSJitInfo_AliasSet::AliasEverything as u8,
84 JSValueType::JSVAL_TYPE_BOOLEAN as u8,
85 true,
86 false,
87 false,
88 false,
89 false,
90 false,
91 0,
92 ).to_ne_bytes()
93 ),
94});
95}
96static disabled_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
97
98pub(crate) fn init_disabled_setterinfo<D: DomTypes>() {
99 disabled_setterinfo.set(JSJitInfo {
100 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
101 setter: Some(set_disabled::<D>)
102 },
103 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
104 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
105 },
106 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
107 _bitfield_align_1: [],
108 _bitfield_1: __BindgenBitfieldUnit::new(
109 new_jsjitinfo_bitfield_1!(
110 JSJitInfo_OpType::Setter as u8,
111 JSJitInfo_AliasSet::AliasEverything as u8,
112 JSValueType::JSVAL_TYPE_UNDEFINED as u8,
113 false,
114 false,
115 false,
116 false,
117 false,
118 false,
119 0,
120 ).to_ne_bytes()
121 ),
122});
123}
124unsafe extern "C" fn get_form<D: DomTypes>
125(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
126 let mut result = false;
127 wrap_panic(&mut || result = (|| {
128 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
129 let this = &*(this as *const D::HTMLFieldSetElement);
130 let result: Option<DomRoot<D::HTMLFormElement>> = this.GetForm();
131
132 (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
133 return true;
134 })());
135 result
136}
137
138
139static form_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
140
141pub(crate) fn init_form_getterinfo<D: DomTypes>() {
142 form_getterinfo.set(JSJitInfo {
143 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
144 getter: Some(get_form::<D>)
145 },
146 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
147 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
148 },
149 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
150 _bitfield_align_1: [],
151 _bitfield_1: __BindgenBitfieldUnit::new(
152 new_jsjitinfo_bitfield_1!(
153 JSJitInfo_OpType::Getter as u8,
154 JSJitInfo_AliasSet::AliasEverything as u8,
155 JSValueType::JSVAL_TYPE_UNKNOWN as u8,
156 true,
157 false,
158 false,
159 false,
160 false,
161 false,
162 0,
163 ).to_ne_bytes()
164 ),
165});
166}
167unsafe extern "C" fn get_name<D: DomTypes>
168(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
169 let mut result = false;
170 wrap_panic(&mut || result = (|| {
171 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
172 let this = &*(this as *const D::HTMLFieldSetElement);
173 <D as DomHelpers<D>>::push_new_element_queue();
174
175 let result: DOMString = this.Name();
176 <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
177
178
179 (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
180 return true;
181 })());
182 result
183}
184
185unsafe extern "C" fn set_name<D: DomTypes>
186(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
187 let mut result = false;
188 wrap_panic(&mut || result = (|| {
189 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
190 let this = &*(this as *const D::HTMLFieldSetElement);
191 let arg0: DOMString = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), StringificationBehavior::Default) {
192 Ok(ConversionResult::Success(value)) => value,
193 Ok(ConversionResult::Failure(error)) => {
194 throw_type_error(cx.raw_cx(), &error);
195 return false;
196
197 }
198 _ => {
199 return false;
200
201 },
202 }
203 ;
204 <D as DomHelpers<D>>::push_new_element_queue();
205
206 let result: () = this.SetName(arg0);
207 <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
208
209
210 true
211 })());
212 result
213}
214
215
216static name_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
217
218pub(crate) fn init_name_getterinfo<D: DomTypes>() {
219 name_getterinfo.set(JSJitInfo {
220 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
221 getter: Some(get_name::<D>)
222 },
223 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
224 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
225 },
226 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
227 _bitfield_align_1: [],
228 _bitfield_1: __BindgenBitfieldUnit::new(
229 new_jsjitinfo_bitfield_1!(
230 JSJitInfo_OpType::Getter as u8,
231 JSJitInfo_AliasSet::AliasEverything as u8,
232 JSValueType::JSVAL_TYPE_STRING as u8,
233 true,
234 false,
235 false,
236 false,
237 false,
238 false,
239 0,
240 ).to_ne_bytes()
241 ),
242});
243}
244static name_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
245
246pub(crate) fn init_name_setterinfo<D: DomTypes>() {
247 name_setterinfo.set(JSJitInfo {
248 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
249 setter: Some(set_name::<D>)
250 },
251 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
252 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
253 },
254 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
255 _bitfield_align_1: [],
256 _bitfield_1: __BindgenBitfieldUnit::new(
257 new_jsjitinfo_bitfield_1!(
258 JSJitInfo_OpType::Setter as u8,
259 JSJitInfo_AliasSet::AliasEverything as u8,
260 JSValueType::JSVAL_TYPE_UNDEFINED as u8,
261 false,
262 false,
263 false,
264 false,
265 false,
266 false,
267 0,
268 ).to_ne_bytes()
269 ),
270});
271}
272unsafe extern "C" fn get_type<D: DomTypes>
273(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
274 let mut result = false;
275 wrap_panic(&mut || result = (|| {
276 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
277 let this = &*(this as *const D::HTMLFieldSetElement);
278 let result: DOMString = this.Type();
279
280 (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
281 return true;
282 })());
283 result
284}
285
286
287static type_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
288
289pub(crate) fn init_type_getterinfo<D: DomTypes>() {
290 type_getterinfo.set(JSJitInfo {
291 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
292 getter: Some(get_type::<D>)
293 },
294 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
295 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
296 },
297 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
298 _bitfield_align_1: [],
299 _bitfield_1: __BindgenBitfieldUnit::new(
300 new_jsjitinfo_bitfield_1!(
301 JSJitInfo_OpType::Getter as u8,
302 JSJitInfo_AliasSet::AliasEverything as u8,
303 JSValueType::JSVAL_TYPE_STRING as u8,
304 true,
305 false,
306 false,
307 false,
308 false,
309 false,
310 0,
311 ).to_ne_bytes()
312 ),
313});
314}
315unsafe extern "C" fn get_elements<D: DomTypes>
316(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
317 let mut result = false;
318 wrap_panic(&mut || result = (|| {
319 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
320 let this = &*(this as *const D::HTMLFieldSetElement);
321 let result: DomRoot<D::HTMLCollection> = this.Elements(CanGc::note());
322
323 (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
324 return true;
325 })());
326 result
327}
328
329
330static elements_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
331
332pub(crate) fn init_elements_getterinfo<D: DomTypes>() {
333 elements_getterinfo.set(JSJitInfo {
334 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
335 getter: Some(get_elements::<D>)
336 },
337 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
338 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
339 },
340 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
341 _bitfield_align_1: [],
342 _bitfield_1: __BindgenBitfieldUnit::new(
343 new_jsjitinfo_bitfield_1!(
344 JSJitInfo_OpType::Getter as u8,
345 JSJitInfo_AliasSet::AliasNone as u8,
346 JSValueType::JSVAL_TYPE_OBJECT as u8,
347 true,
348 true,
349 false,
350 false,
351 false,
352 false,
353 0,
354 ).to_ne_bytes()
355 ),
356});
357}
358unsafe extern "C" fn get_willValidate<D: DomTypes>
359(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
360 let mut result = false;
361 wrap_panic(&mut || result = (|| {
362 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
363 let this = &*(this as *const D::HTMLFieldSetElement);
364 let result: bool = this.WillValidate();
365
366 (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
367 return true;
368 })());
369 result
370}
371
372
373static willValidate_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
374
375pub(crate) fn init_willValidate_getterinfo<D: DomTypes>() {
376 willValidate_getterinfo.set(JSJitInfo {
377 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
378 getter: Some(get_willValidate::<D>)
379 },
380 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
381 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
382 },
383 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
384 _bitfield_align_1: [],
385 _bitfield_1: __BindgenBitfieldUnit::new(
386 new_jsjitinfo_bitfield_1!(
387 JSJitInfo_OpType::Getter as u8,
388 JSJitInfo_AliasSet::AliasEverything as u8,
389 JSValueType::JSVAL_TYPE_BOOLEAN as u8,
390 true,
391 false,
392 false,
393 false,
394 false,
395 false,
396 0,
397 ).to_ne_bytes()
398 ),
399});
400}
401unsafe extern "C" fn get_validity<D: DomTypes>
402(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
403 let mut result = false;
404 wrap_panic(&mut || result = (|| {
405 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
406 let this = &*(this as *const D::HTMLFieldSetElement);
407 let result: DomRoot<D::ValidityState> = this.Validity(CanGc::note());
408
409 (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
410 return true;
411 })());
412 result
413}
414
415
416static validity_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
417
418pub(crate) fn init_validity_getterinfo<D: DomTypes>() {
419 validity_getterinfo.set(JSJitInfo {
420 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
421 getter: Some(get_validity::<D>)
422 },
423 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
424 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
425 },
426 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
427 _bitfield_align_1: [],
428 _bitfield_1: __BindgenBitfieldUnit::new(
429 new_jsjitinfo_bitfield_1!(
430 JSJitInfo_OpType::Getter as u8,
431 JSJitInfo_AliasSet::AliasNone as u8,
432 JSValueType::JSVAL_TYPE_OBJECT as u8,
433 true,
434 true,
435 false,
436 false,
437 false,
438 false,
439 0,
440 ).to_ne_bytes()
441 ),
442});
443}
444unsafe extern "C" fn get_validationMessage<D: DomTypes>
445(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
446 let mut result = false;
447 wrap_panic(&mut || result = (|| {
448 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
449 let this = &*(this as *const D::HTMLFieldSetElement);
450 let result: DOMString = this.ValidationMessage();
451
452 (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
453 return true;
454 })());
455 result
456}
457
458
459static validationMessage_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
460
461pub(crate) fn init_validationMessage_getterinfo<D: DomTypes>() {
462 validationMessage_getterinfo.set(JSJitInfo {
463 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
464 getter: Some(get_validationMessage::<D>)
465 },
466 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
467 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
468 },
469 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
470 _bitfield_align_1: [],
471 _bitfield_1: __BindgenBitfieldUnit::new(
472 new_jsjitinfo_bitfield_1!(
473 JSJitInfo_OpType::Getter as u8,
474 JSJitInfo_AliasSet::AliasEverything as u8,
475 JSValueType::JSVAL_TYPE_STRING as u8,
476 true,
477 false,
478 false,
479 false,
480 false,
481 false,
482 0,
483 ).to_ne_bytes()
484 ),
485});
486}
487unsafe extern "C" fn checkValidity<D: DomTypes>
488(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: *const JSJitMethodCallArgs) -> bool{
489 let mut result = false;
490 wrap_panic(&mut || result = (|| {
491 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
492 let this = &*(this as *const D::HTMLFieldSetElement);
493 let args = &*args;
494 let argc = args.argc_;
495 let result: bool = this.CheckValidity(CanGc::note());
496
497 (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
498 return true;
499 })());
500 result
501}
502
503
504static checkValidity_methodinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
505
506pub(crate) fn init_checkValidity_methodinfo<D: DomTypes>() {
507 checkValidity_methodinfo.set(JSJitInfo {
508 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
509 method: Some(checkValidity::<D>)
510 },
511 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
512 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
513 },
514 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
515 _bitfield_align_1: [],
516 _bitfield_1: __BindgenBitfieldUnit::new(
517 new_jsjitinfo_bitfield_1!(
518 JSJitInfo_OpType::Method as u8,
519 JSJitInfo_AliasSet::AliasEverything as u8,
520 JSValueType::JSVAL_TYPE_BOOLEAN as u8,
521 true,
522 false,
523 false,
524 false,
525 false,
526 false,
527 0,
528 ).to_ne_bytes()
529 ),
530});
531}
532unsafe extern "C" fn reportValidity<D: DomTypes>
533(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: *const JSJitMethodCallArgs) -> bool{
534 let mut result = false;
535 wrap_panic(&mut || result = (|| {
536 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
537 let this = &*(this as *const D::HTMLFieldSetElement);
538 let args = &*args;
539 let argc = args.argc_;
540 let result: bool = this.ReportValidity(CanGc::note());
541
542 (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
543 return true;
544 })());
545 result
546}
547
548
549static reportValidity_methodinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
550
551pub(crate) fn init_reportValidity_methodinfo<D: DomTypes>() {
552 reportValidity_methodinfo.set(JSJitInfo {
553 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
554 method: Some(reportValidity::<D>)
555 },
556 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
557 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
558 },
559 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
560 _bitfield_align_1: [],
561 _bitfield_1: __BindgenBitfieldUnit::new(
562 new_jsjitinfo_bitfield_1!(
563 JSJitInfo_OpType::Method as u8,
564 JSJitInfo_AliasSet::AliasEverything as u8,
565 JSValueType::JSVAL_TYPE_BOOLEAN as u8,
566 true,
567 false,
568 false,
569 false,
570 false,
571 false,
572 0,
573 ).to_ne_bytes()
574 ),
575});
576}
577unsafe extern "C" fn setCustomValidity<D: DomTypes>
578(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: *const JSJitMethodCallArgs) -> bool{
579 let mut result = false;
580 wrap_panic(&mut || result = (|| {
581 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
582 let this = &*(this as *const D::HTMLFieldSetElement);
583 let args = &*args;
584 let argc = args.argc_;
585
586 if argc < 1 {
587 throw_type_error(cx.raw_cx(), "Not enough arguments to \"HTMLFieldSetElement.setCustomValidity\".");
588 return false;
589 }
590 let arg0: DOMString = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), StringificationBehavior::Default) {
591 Ok(ConversionResult::Success(value)) => value,
592 Ok(ConversionResult::Failure(error)) => {
593 throw_type_error(cx.raw_cx(), &error);
594 return false;
595
596 }
597 _ => {
598 return false;
599
600 },
601 }
602 ;
603 let result: () = this.SetCustomValidity(arg0, CanGc::note());
604
605 (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
606 return true;
607 })());
608 result
609}
610
611
612static setCustomValidity_methodinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
613
614pub(crate) fn init_setCustomValidity_methodinfo<D: DomTypes>() {
615 setCustomValidity_methodinfo.set(JSJitInfo {
616 __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
617 method: Some(setCustomValidity::<D>)
618 },
619 __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
620 protoID: PrototypeList::ID::HTMLFieldSetElement as u16,
621 },
622 __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
623 _bitfield_align_1: [],
624 _bitfield_1: __BindgenBitfieldUnit::new(
625 new_jsjitinfo_bitfield_1!(
626 JSJitInfo_OpType::Method as u8,
627 JSJitInfo_AliasSet::AliasEverything as u8,
628 JSValueType::JSVAL_TYPE_UNDEFINED as u8,
629 false,
630 false,
631 false,
632 false,
633 false,
634 false,
635 0,
636 ).to_ne_bytes()
637 ),
638});
639}
640unsafe extern "C" fn _finalize<D: DomTypes>
641(_cx: *mut GCContext, obj: *mut JSObject){
642 wrap_panic(&mut || {
643
644 let this = native_from_object_static::<D::HTMLFieldSetElement>(obj).unwrap();
645 finalize_common(this);
646 })
647}
648
649unsafe extern "C" fn _trace<D: DomTypes>
650(trc: *mut JSTracer, obj: *mut JSObject){
651 wrap_panic(&mut || {
652
653 let this = native_from_object_static::<D::HTMLFieldSetElement>(obj).unwrap();
654 if this.is_null() { return; } (*this).trace(trc);
656 })
657}
658
659
660static CLASS_OPS: ThreadUnsafeOnceLock<JSClassOps> = ThreadUnsafeOnceLock::new();
661
662pub(crate) fn init_class_ops<D: DomTypes>() {
663 CLASS_OPS.set(JSClassOps {
664 addProperty: None,
665 delProperty: None,
666 enumerate: None,
667 newEnumerate: None,
668 resolve: None,
669 mayResolve: None,
670 finalize: Some(_finalize::<D>),
671 call: None,
672 construct: None,
673 trace: Some(_trace::<D>),
674 });
675}
676
677pub static Class: ThreadUnsafeOnceLock<DOMJSClass> = ThreadUnsafeOnceLock::new();
678
679pub(crate) fn init_domjs_class<D: DomTypes>() {
680 init_class_ops::<D>();
681 Class.set(DOMJSClass {
682 base: JSClass {
683 name: c"HTMLFieldSetElement".as_ptr(),
684 flags: JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE |
685 (((1) & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT)
686 ,
687 cOps: unsafe { CLASS_OPS.get() },
688 spec: ptr::null(),
689 ext: ptr::null(),
690 oOps: ptr::null(),
691 },
692 dom_class:
693DOMClass {
694 interface_chain: [ PrototypeList::ID::EventTarget, PrototypeList::ID::Node, PrototypeList::ID::Element, PrototypeList::ID::HTMLElement, PrototypeList::ID::HTMLFieldSetElement, PrototypeList::ID::Last ],
695 depth: 4,
696 type_id: crate::codegen::InheritTypes::TopTypeId { eventtarget: (crate::codegen::InheritTypes::EventTargetTypeId::Node(crate::codegen::InheritTypes::NodeTypeId::Element(crate::codegen::InheritTypes::ElementTypeId::HTMLElement(crate::codegen::InheritTypes::HTMLElementTypeId::HTMLFieldSetElement)))) },
697 malloc_size_of: malloc_size_of_including_raw_self::<D::HTMLFieldSetElement> as unsafe fn(&mut _, _) -> _,
698 global: Globals::EMPTY,
699},
700 });
701}
702
703#[cfg_attr(crown, allow(crown::unrooted_must_root))] pub unsafe fn Wrap<D: DomTypes>
704(cx: SafeJSContext, scope: &D::GlobalScope, given_proto: Option<HandleObject>, object: Box<D::HTMLFieldSetElement>, _can_gc: CanGc) -> DomRoot<D::HTMLFieldSetElement>{
705
706 let raw = Root::new(MaybeUnreflectedDom::from_box(object));
707
708 let scope = scope.reflector().get_jsobject();
709 assert!(!scope.get().is_null());
710 assert!(((*get_object_class(scope.get())).flags & JSCLASS_IS_GLOBAL) != 0);
711 let _ac = JSAutoRealm::new(cx.raw_cx(), scope.get());
712
713 rooted!(&in(cx) let mut canonical_proto = ptr::null_mut::<JSObject>());
714 GetProtoObject::<D>(cx, scope, canonical_proto.handle_mut());
715 assert!(!canonical_proto.is_null());
716
717
718 rooted!(&in(cx) let mut proto = ptr::null_mut::<JSObject>());
719 if let Some(given) = given_proto {
720 proto.set(*given);
721 if get_context_realm(cx.raw_cx()) != get_object_realm(*given) {
722 assert!(JS_WrapObject(cx.raw_cx(), proto.handle_mut()));
723 }
724 } else {
725 proto.set(*canonical_proto);
726 }
727 rooted!(&in(cx) let obj = JS_NewObjectWithGivenProto(
728 cx.raw_cx(),
729 &Class.get().base,
730 proto.handle(),
731 ));
732 assert!(!obj.is_null());
733 JS_SetReservedSlot(
734 obj.get(),
735 DOM_OBJECT_SLOT,
736 &PrivateValue(raw.as_ptr() as *const libc::c_void),
737 );
738
739 let root = raw.reflect_with(obj.get());
740
741
742
743 DomRoot::from_ref(&*root)
744}
745
746pub trait HTMLFieldSetElementMethods<D: DomTypes> {
747 fn Disabled(&self, ) -> bool;
748 fn SetDisabled(&self, r#value: bool);
749 fn GetForm(&self, ) -> Option<DomRoot<D::HTMLFormElement>>;
750 fn Name(&self, ) -> DOMString;
751 fn SetName(&self, r#value: DOMString);
752 fn Type(&self, ) -> DOMString;
753 fn Elements(&self, r#_can_gc: CanGc) -> DomRoot<D::HTMLCollection>;
754 fn WillValidate(&self, ) -> bool;
755 fn Validity(&self, r#_can_gc: CanGc) -> DomRoot<D::ValidityState>;
756 fn ValidationMessage(&self, ) -> DOMString;
757 fn CheckValidity(&self, r#_can_gc: CanGc) -> bool;
758 fn ReportValidity(&self, r#_can_gc: CanGc) -> bool;
759 fn SetCustomValidity(&self, r#error: DOMString, r#_can_gc: CanGc);
760}
761static sMethods_specs: ThreadUnsafeOnceLock<&[&[JSFunctionSpec]]> = ThreadUnsafeOnceLock::new();
762
763pub(crate) fn init_sMethods_specs<D: DomTypes>() {
764 sMethods_specs.set(Box::leak(Box::new([&Box::leak(Box::new([
765 JSFunctionSpec {
766 name: JSPropertySpec_Name { string_: c"checkValidity".as_ptr() },
767 call: JSNativeWrapper { op: Some(generic_method::<false>), info: unsafe { checkValidity_methodinfo.get() } as *const _ as *const JSJitInfo },
768 nargs: 0,
769 flags: (JSPROP_ENUMERATE) as u16,
770 selfHostedName: ptr::null()
771 },
772 JSFunctionSpec {
773 name: JSPropertySpec_Name { string_: c"reportValidity".as_ptr() },
774 call: JSNativeWrapper { op: Some(generic_method::<false>), info: unsafe { reportValidity_methodinfo.get() } as *const _ as *const JSJitInfo },
775 nargs: 0,
776 flags: (JSPROP_ENUMERATE) as u16,
777 selfHostedName: ptr::null()
778 },
779 JSFunctionSpec {
780 name: JSPropertySpec_Name { string_: c"setCustomValidity".as_ptr() },
781 call: JSNativeWrapper { op: Some(generic_method::<false>), info: unsafe { setCustomValidity_methodinfo.get() } as *const _ as *const JSJitInfo },
782 nargs: 1,
783 flags: (JSPROP_ENUMERATE) as u16,
784 selfHostedName: ptr::null()
785 },
786 JSFunctionSpec {
787 name: JSPropertySpec_Name { string_: ptr::null() },
788 call: JSNativeWrapper { op: None, info: ptr::null() },
789 nargs: 0,
790 flags: 0,
791 selfHostedName: ptr::null()
792 }]))[..]
793])));
794}static sMethods: ThreadUnsafeOnceLock<&[Guard<&[JSFunctionSpec]>]> = ThreadUnsafeOnceLock::new();
795
796pub(crate) fn init_sMethods_prefs<D: DomTypes>() {
797 sMethods.set(Box::leak(Box::new([ Guard::new(&[Condition::Exposed(Globals::WINDOW)], (unsafe { sMethods_specs.get() })[0])])));
798}static sAttributes_specs: ThreadUnsafeOnceLock<&[&[JSPropertySpec]]> = ThreadUnsafeOnceLock::new();
799
800pub(crate) fn init_sAttributes_specs<D: DomTypes>() {
801 sAttributes_specs.set(Box::leak(Box::new([&Box::leak(Box::new([
802 JSPropertySpec {
803 name: JSPropertySpec_Name { string_: c"disabled".as_ptr() },
804 attributes_: (JSPROP_ENUMERATE),
805 kind_: (JSPropertySpec_Kind::NativeAccessor),
806 u: JSPropertySpec_AccessorsOrValue {
807 accessors: JSPropertySpec_AccessorsOrValue_Accessors {
808 getter: JSPropertySpec_Accessor {
809 native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { disabled_getterinfo.get() } },
810 },
811 setter: JSPropertySpec_Accessor {
812 native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { disabled_setterinfo.get() } },
813 }
814 }
815 }
816 }
817,
818 JSPropertySpec {
819 name: JSPropertySpec_Name { string_: c"form".as_ptr() },
820 attributes_: (JSPROP_ENUMERATE),
821 kind_: (JSPropertySpec_Kind::NativeAccessor),
822 u: JSPropertySpec_AccessorsOrValue {
823 accessors: JSPropertySpec_AccessorsOrValue_Accessors {
824 getter: JSPropertySpec_Accessor {
825 native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { form_getterinfo.get() } },
826 },
827 setter: JSPropertySpec_Accessor {
828 native: JSNativeWrapper { op: None, info: ptr::null() },
829 }
830 }
831 }
832 }
833,
834 JSPropertySpec {
835 name: JSPropertySpec_Name { string_: c"name".as_ptr() },
836 attributes_: (JSPROP_ENUMERATE),
837 kind_: (JSPropertySpec_Kind::NativeAccessor),
838 u: JSPropertySpec_AccessorsOrValue {
839 accessors: JSPropertySpec_AccessorsOrValue_Accessors {
840 getter: JSPropertySpec_Accessor {
841 native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { name_getterinfo.get() } },
842 },
843 setter: JSPropertySpec_Accessor {
844 native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { name_setterinfo.get() } },
845 }
846 }
847 }
848 }
849,
850 JSPropertySpec {
851 name: JSPropertySpec_Name { string_: c"type".as_ptr() },
852 attributes_: (JSPROP_ENUMERATE),
853 kind_: (JSPropertySpec_Kind::NativeAccessor),
854 u: JSPropertySpec_AccessorsOrValue {
855 accessors: JSPropertySpec_AccessorsOrValue_Accessors {
856 getter: JSPropertySpec_Accessor {
857 native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { type_getterinfo.get() } },
858 },
859 setter: JSPropertySpec_Accessor {
860 native: JSNativeWrapper { op: None, info: ptr::null() },
861 }
862 }
863 }
864 }
865,
866 JSPropertySpec {
867 name: JSPropertySpec_Name { string_: c"elements".as_ptr() },
868 attributes_: (JSPROP_ENUMERATE),
869 kind_: (JSPropertySpec_Kind::NativeAccessor),
870 u: JSPropertySpec_AccessorsOrValue {
871 accessors: JSPropertySpec_AccessorsOrValue_Accessors {
872 getter: JSPropertySpec_Accessor {
873 native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { elements_getterinfo.get() } },
874 },
875 setter: JSPropertySpec_Accessor {
876 native: JSNativeWrapper { op: None, info: ptr::null() },
877 }
878 }
879 }
880 }
881,
882 JSPropertySpec {
883 name: JSPropertySpec_Name { string_: c"willValidate".as_ptr() },
884 attributes_: (JSPROP_ENUMERATE),
885 kind_: (JSPropertySpec_Kind::NativeAccessor),
886 u: JSPropertySpec_AccessorsOrValue {
887 accessors: JSPropertySpec_AccessorsOrValue_Accessors {
888 getter: JSPropertySpec_Accessor {
889 native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { willValidate_getterinfo.get() } },
890 },
891 setter: JSPropertySpec_Accessor {
892 native: JSNativeWrapper { op: None, info: ptr::null() },
893 }
894 }
895 }
896 }
897,
898 JSPropertySpec {
899 name: JSPropertySpec_Name { string_: c"validity".as_ptr() },
900 attributes_: (JSPROP_ENUMERATE),
901 kind_: (JSPropertySpec_Kind::NativeAccessor),
902 u: JSPropertySpec_AccessorsOrValue {
903 accessors: JSPropertySpec_AccessorsOrValue_Accessors {
904 getter: JSPropertySpec_Accessor {
905 native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { validity_getterinfo.get() } },
906 },
907 setter: JSPropertySpec_Accessor {
908 native: JSNativeWrapper { op: None, info: ptr::null() },
909 }
910 }
911 }
912 }
913,
914 JSPropertySpec {
915 name: JSPropertySpec_Name { string_: c"validationMessage".as_ptr() },
916 attributes_: (JSPROP_ENUMERATE),
917 kind_: (JSPropertySpec_Kind::NativeAccessor),
918 u: JSPropertySpec_AccessorsOrValue {
919 accessors: JSPropertySpec_AccessorsOrValue_Accessors {
920 getter: JSPropertySpec_Accessor {
921 native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { validationMessage_getterinfo.get() } },
922 },
923 setter: JSPropertySpec_Accessor {
924 native: JSNativeWrapper { op: None, info: ptr::null() },
925 }
926 }
927 }
928 }
929,
930 JSPropertySpec::ZERO]))[..]
931,
932&Box::leak(Box::new([
933 JSPropertySpec {
934 name: JSPropertySpec_Name { symbol_: SymbolCode::toStringTag as usize + 1 },
935 attributes_: (JSPROP_READONLY),
936 kind_: (JSPropertySpec_Kind::Value),
937 u: JSPropertySpec_AccessorsOrValue {
938 value: JSPropertySpec_ValueWrapper {
939 type_: JSPropertySpec_ValueWrapper_Type::String,
940 __bindgen_anon_1: JSPropertySpec_ValueWrapper__bindgen_ty_1 {
941 string: c"HTMLFieldSetElement".as_ptr(),
942 }
943 }
944 }
945 }
946,
947 JSPropertySpec::ZERO]))[..]
948])));
949}static sAttributes: ThreadUnsafeOnceLock<&[Guard<&[JSPropertySpec]>]> = ThreadUnsafeOnceLock::new();
950
951pub(crate) fn init_sAttributes_prefs<D: DomTypes>() {
952 sAttributes.set(Box::leak(Box::new([ Guard::new(&[Condition::Exposed(Globals::WINDOW)], (unsafe { sAttributes_specs.get() })[0]),
953 Guard::new(&[Condition::Satisfied], (unsafe { sAttributes_specs.get() })[1])])));
954}
955pub fn GetProtoObject<D: DomTypes>
956(cx: SafeJSContext, global: HandleObject, mut rval: MutableHandleObject){
957 get_per_interface_object_handle(cx, global, ProtoOrIfaceIndex::ID(PrototypeList::ID::HTMLFieldSetElement), CreateInterfaceObjects::<D>, rval)
959}
960
961
962static PrototypeClass: JSClass = JSClass {
963 name: c"HTMLFieldSetElementPrototype".as_ptr(),
964 flags:
965 (0 ) << JSCLASS_RESERVED_SLOTS_SHIFT,
967 cOps: ptr::null(),
968 spec: ptr::null(),
969 ext: ptr::null(),
970 oOps: ptr::null(),
971};
972
973unsafe extern "C" fn _constructor<D: DomTypes>
974(cx: *mut RawJSContext, argc: u32, vp: *mut JSVal) -> bool{
975 let mut result = false;
976 wrap_panic(&mut || result = {
977 let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
978 let args = CallArgs::from_vp(vp, argc);
979 let global = D::GlobalScope::from_object(JS_CALLEE(cx.raw_cx(), vp).to_object());
980
981 <D as DomHelpers<D>>::call_html_constructor::<D::HTMLFieldSetElement>(
982 SafeJSContext::from_ptr(cx.raw_cx()),
983 &args,
984 &global,
985 PrototypeList::ID::HTMLFieldSetElement,
986 CreateInterfaceObjects::<D>,
987 CanGc::note()
988 )
989
990 });
991 result
992}
993
994
995static INTERFACE_OBJECT_CLASS: ThreadUnsafeOnceLock<NonCallbackInterfaceObjectClass> = ThreadUnsafeOnceLock::new();
996
997pub(crate) fn init_interface_object<D: DomTypes>() {
998 INTERFACE_OBJECT_CLASS.set(NonCallbackInterfaceObjectClass::new(
999 Box::leak(Box::new(InterfaceConstructorBehavior::call(_constructor::<D>))),
1000 b"function HTMLFieldSetElement() {\n [native code]\n}",
1001 PrototypeList::ID::HTMLFieldSetElement,
1002 4,
1003 ));
1004}
1005
1006pub fn GetConstructorObject<D: DomTypes>
1007(cx: SafeJSContext, global: HandleObject, mut rval: MutableHandleObject){
1008 get_per_interface_object_handle(cx, global, ProtoOrIfaceIndex::Constructor(PrototypeList::Constructor::HTMLFieldSetElement), CreateInterfaceObjects::<D>, rval)
1010}
1011
1012pub fn DefineDOMInterface<D: DomTypes>
1013(cx: SafeJSContext, global: HandleObject){
1014 define_dom_interface(cx, global, ProtoOrIfaceIndex::ID(PrototypeList::ID::HTMLFieldSetElement),CreateInterfaceObjects::<D>, ConstructorEnabled::<D>)
1015}
1016
1017pub fn ConstructorEnabled<D: DomTypes>
1018(aCx: SafeJSContext, aObj: HandleObject) -> bool{
1019 is_exposed_in(aObj, Globals::WINDOW)
1020}
1021
1022unsafe fn CreateInterfaceObjects<D: DomTypes>
1023(cx: SafeJSContext, global: HandleObject, cache: *mut ProtoOrIfaceArray){
1024
1025 rooted!(&in(cx) let mut prototype_proto = ptr::null_mut::<JSObject>());
1026 HTMLElement_Binding::GetProtoObject::<D>(cx, global, prototype_proto.handle_mut());
1027 assert!(!prototype_proto.is_null());
1028
1029 rooted!(&in(cx) let mut prototype = ptr::null_mut::<JSObject>());
1030 create_interface_prototype_object::<D>(cx,
1031 global,
1032 prototype_proto.handle(),
1033 &PrototypeClass,
1034 sMethods.get(),
1035 sAttributes.get(),
1036 &[],
1037 &[],
1038 prototype.handle_mut());
1039 assert!(!prototype.is_null());
1040 assert!((*cache)[PrototypeList::ID::HTMLFieldSetElement as usize].is_null());
1041 (*cache)[PrototypeList::ID::HTMLFieldSetElement as usize] = prototype.get();
1042 <*mut JSObject>::post_barrier((*cache).as_mut_ptr().offset(PrototypeList::ID::HTMLFieldSetElement as isize),
1043 ptr::null_mut(),
1044 prototype.get());
1045
1046 rooted!(&in(cx) let mut interface_proto = ptr::null_mut::<JSObject>());
1047
1048 HTMLElement_Binding::GetConstructorObject::<D>(cx, global, interface_proto.handle_mut());
1049
1050 assert!(!interface_proto.is_null());
1051
1052 rooted!(&in(cx) let mut interface = ptr::null_mut::<JSObject>());
1053 create_noncallback_interface_object::<D>(cx,
1054 global,
1055 interface_proto.handle(),
1056 INTERFACE_OBJECT_CLASS.get(),
1057 &[],
1058 &[],
1059 &[],
1060 prototype.handle(),
1061 c"HTMLFieldSetElement",
1062 0,
1063 &[],
1064 interface.handle_mut());
1065 assert!(!interface.is_null());
1066
1067 assert!((*cache)[PrototypeList::Constructor::HTMLFieldSetElement as usize].is_null());
1068 (*cache)[PrototypeList::Constructor::HTMLFieldSetElement as usize] = interface.get();
1069 <*mut JSObject>::post_barrier((*cache).as_mut_ptr().offset(PrototypeList::Constructor::HTMLFieldSetElement as isize),
1070 ptr::null_mut(),
1071 interface.get());
1072
1073}
1074
1075
1076 pub(crate) fn init_statics<D: DomTypes>() {
1077 init_interface_object::<D>();
1078 init_domjs_class::<D>();
1079 crate::codegen::GenericBindings::HTMLFieldSetElementBinding::HTMLFieldSetElement_Binding::init_checkValidity_methodinfo::<D>();
1080crate::codegen::GenericBindings::HTMLFieldSetElementBinding::HTMLFieldSetElement_Binding::init_reportValidity_methodinfo::<D>();
1081crate::codegen::GenericBindings::HTMLFieldSetElementBinding::HTMLFieldSetElement_Binding::init_setCustomValidity_methodinfo::<D>();
1082 init_disabled_getterinfo::<D>();
1083init_form_getterinfo::<D>();
1084init_name_getterinfo::<D>();
1085init_type_getterinfo::<D>();
1086init_elements_getterinfo::<D>();
1087init_willValidate_getterinfo::<D>();
1088init_validity_getterinfo::<D>();
1089init_validationMessage_getterinfo::<D>();
1090 init_disabled_setterinfo::<D>();
1091init_name_setterinfo::<D>();
1092
1093 init_sMethods_specs::<D>();
1094init_sMethods_prefs::<D>();
1095init_sAttributes_specs::<D>();
1096init_sAttributes_prefs::<D>();
1097 }
1098 }