/work/obj-fuzz/dist/include/mozilla/dom/HTMLInputElementBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM HTMLInputElement.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_HTMLInputElementBinding_h |
4 | | #define mozilla_dom_HTMLInputElementBinding_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 DateTimeValueAtoms; |
18 | | class HTMLInputElement; |
19 | | struct HTMLInputElementAtoms; |
20 | | struct NativePropertyHooks; |
21 | | class ProtoAndIfaceCache; |
22 | | |
23 | | } // namespace dom |
24 | | } // namespace mozilla |
25 | | |
26 | | namespace mozilla { |
27 | | namespace dom { |
28 | | |
29 | | enum class SelectionMode : uint8_t { |
30 | | Select, |
31 | | Start, |
32 | | End, |
33 | | Preserve, |
34 | | EndGuard_ |
35 | | }; |
36 | | |
37 | | namespace SelectionModeValues { |
38 | | extern const EnumEntry strings[5]; |
39 | | } // namespace SelectionModeValues |
40 | | |
41 | | bool |
42 | | ToJSValue(JSContext* aCx, SelectionMode aArgument, JS::MutableHandle<JS::Value> aValue); |
43 | | |
44 | | |
45 | | struct DateTimeValue : public DictionaryBase |
46 | | { |
47 | | MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mDay; |
48 | | MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mHour; |
49 | | MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mMinute; |
50 | | MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mMonth; |
51 | | MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mYear; |
52 | | |
53 | | DateTimeValue(); |
54 | | |
55 | | explicit inline DateTimeValue(const FastDictionaryInitializer& ) |
56 | 0 | { |
57 | 0 | // Do nothing here; this is used by our "Fast" subclass |
58 | 0 | } |
59 | | |
60 | | explicit inline DateTimeValue(const DateTimeValue& aOther) |
61 | 0 | { |
62 | 0 | *this = aOther; |
63 | 0 | } |
64 | | |
65 | | bool |
66 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
67 | | |
68 | | bool |
69 | | Init(const nsAString& aJSON); |
70 | | |
71 | | bool |
72 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
73 | | |
74 | | bool |
75 | | ToJSON(nsAString& aJSON) const; |
76 | | |
77 | | void |
78 | | TraceDictionary(JSTracer* trc); |
79 | | |
80 | | DateTimeValue& |
81 | | operator=(const DateTimeValue& aOther); |
82 | | |
83 | | private: |
84 | | static bool |
85 | | InitIds(JSContext* cx, DateTimeValueAtoms* atomsCache); |
86 | | }; |
87 | | |
88 | | namespace binding_detail { |
89 | | struct FastDateTimeValue : public DateTimeValue |
90 | | { |
91 | | inline FastDateTimeValue() |
92 | | : DateTimeValue(FastDictionaryInitializer()) |
93 | 0 | { |
94 | 0 | // Doesn't matter what int we pass to the parent constructor |
95 | 0 | } |
96 | | }; |
97 | | } // namespace binding_detail |
98 | | |
99 | | |
100 | | namespace HTMLInputElement_Binding { |
101 | | |
102 | | typedef mozilla::dom::HTMLInputElement NativeType; |
103 | | |
104 | | static const int32_t UNKNOWN_REQUEST = -1; |
105 | | static const int32_t CURRENT_REQUEST = 0; |
106 | | static const int32_t PENDING_REQUEST = 1; |
107 | | const JSClass* |
108 | | GetJSClass(); |
109 | | |
110 | | bool |
111 | | Wrap(JSContext* aCx, mozilla::dom::HTMLInputElement* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
112 | | |
113 | | template <class T> |
114 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
115 | 0 | { |
116 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
117 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
118 | 0 | } |
119 | | |
120 | | // We declare this as an array so that retrieving a pointer to this |
121 | | // binding's property hooks only requires compile/link-time resolvable |
122 | | // address arithmetic. Declaring it as a pointer instead would require |
123 | | // doing a run-time load to fetch a pointer to this binding's property |
124 | | // hooks. And then structures which embedded a pointer to this structure |
125 | | // would require a run-time load for proper initialization, which would |
126 | | // then induce static constructors. Lots of static constructors. |
127 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
128 | | |
129 | | void |
130 | | ClearCachedWebkitEntriesValue(mozilla::dom::HTMLInputElement* aObject); |
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::HTMLInputElement, |
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::HTMLInputElement, |
151 | 0 | &CreateInterfaceObjects, |
152 | 0 | aDefineOnGlobal); |
153 | 0 | } |
154 | | |
155 | | JSObject* |
156 | | GetConstructorObject(JSContext* aCx); |
157 | | |
158 | | } // namespace HTMLInputElement_Binding |
159 | | |
160 | | |
161 | | |
162 | | } // namespace dom |
163 | | } // namespace mozilla |
164 | | |
165 | | #endif // mozilla_dom_HTMLInputElementBinding_h |