1 | /* |
2 | This file is part of the WebKit open source project. |
3 | This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
4 | |
5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. |
9 | |
10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. |
14 | |
15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301, USA. |
19 | */ |
20 | |
21 | #include "config.h" |
22 | #include "JSHTMLAppletElement.h" |
23 | |
24 | #include "HTMLNames.h" |
25 | #include "JSDOMAttribute.h" |
26 | #include "JSDOMBinding.h" |
27 | #include "JSDOMConstructorNotConstructable.h" |
28 | #include "JSDOMConvertNumbers.h" |
29 | #include "JSDOMConvertStrings.h" |
30 | #include "JSDOMExceptionHandling.h" |
31 | #include "JSDOMWrapperCache.h" |
32 | #include "JSPluginElementFunctions.h" |
33 | #include "ScriptExecutionContext.h" |
34 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
35 | #include <JavaScriptCore/JSCInlines.h> |
36 | #include <wtf/GetPtr.h> |
37 | #include <wtf/PointerPreparations.h> |
38 | #include <wtf/URL.h> |
39 | |
40 | |
41 | namespace WebCore { |
42 | using namespace JSC; |
43 | |
44 | // Attributes |
45 | |
46 | JSC::EncodedJSValue jsHTMLAppletElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
47 | bool setJSHTMLAppletElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
48 | JSC::EncodedJSValue jsHTMLAppletElementAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
49 | bool setJSHTMLAppletElementAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
50 | JSC::EncodedJSValue jsHTMLAppletElementAlt(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
51 | bool setJSHTMLAppletElementAlt(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
52 | JSC::EncodedJSValue jsHTMLAppletElementArchive(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
53 | bool setJSHTMLAppletElementArchive(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
54 | JSC::EncodedJSValue jsHTMLAppletElementCode(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
55 | bool setJSHTMLAppletElementCode(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
56 | JSC::EncodedJSValue jsHTMLAppletElementCodeBase(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
57 | bool setJSHTMLAppletElementCodeBase(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
58 | JSC::EncodedJSValue jsHTMLAppletElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
59 | bool setJSHTMLAppletElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
60 | JSC::EncodedJSValue jsHTMLAppletElementHspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
61 | bool setJSHTMLAppletElementHspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
62 | JSC::EncodedJSValue jsHTMLAppletElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
63 | bool setJSHTMLAppletElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
64 | JSC::EncodedJSValue jsHTMLAppletElementObject(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
65 | bool setJSHTMLAppletElementObject(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
66 | JSC::EncodedJSValue jsHTMLAppletElementVspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
67 | bool setJSHTMLAppletElementVspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
68 | JSC::EncodedJSValue jsHTMLAppletElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
69 | bool setJSHTMLAppletElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
70 | |
71 | class JSHTMLAppletElementPrototype : public JSC::JSNonFinalObject { |
72 | public: |
73 | using Base = JSC::JSNonFinalObject; |
74 | static JSHTMLAppletElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
75 | { |
76 | JSHTMLAppletElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLAppletElementPrototype>(vm.heap)) JSHTMLAppletElementPrototype(vm, globalObject, structure); |
77 | ptr->finishCreation(vm); |
78 | return ptr; |
79 | } |
80 | |
81 | DECLARE_INFO; |
82 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
83 | { |
84 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
85 | } |
86 | |
87 | private: |
88 | JSHTMLAppletElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
89 | : JSC::JSNonFinalObject(vm, structure) |
90 | { |
91 | } |
92 | |
93 | void finishCreation(JSC::VM&); |
94 | }; |
95 | |
96 | using JSHTMLAppletElementConstructor = JSDOMConstructorNotConstructable<JSHTMLAppletElement>; |
97 | |
98 | template<> JSValue JSHTMLAppletElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
99 | { |
100 | return JSHTMLElement::getConstructor(vm, &globalObject); |
101 | } |
102 | |
103 | template<> void JSHTMLAppletElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
104 | { |
105 | putDirect(vm, vm.propertyNames->prototype, JSHTMLAppletElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
106 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("HTMLAppletElement"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
107 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
108 | } |
109 | |
110 | template<> const ClassInfo JSHTMLAppletElementConstructor::s_info = { "HTMLAppletElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLAppletElementConstructor) }; |
111 | |
112 | /* Hash table for prototype */ |
113 | |
114 | static const HashTableValue JSHTMLAppletElementPrototypeTableValues[] = |
115 | { |
116 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementConstructor) } }, |
117 | { "align" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementAlign), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementAlign) } }, |
118 | { "alt" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementAlt), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementAlt) } }, |
119 | { "archive" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementArchive), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementArchive) } }, |
120 | { "code" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementCode), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementCode) } }, |
121 | { "codeBase" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementCodeBase), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementCodeBase) } }, |
122 | { "height" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementHeight) } }, |
123 | { "hspace" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementHspace), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementHspace) } }, |
124 | { "name" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementName), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementName) } }, |
125 | { "object" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementObject), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementObject) } }, |
126 | { "vspace" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementVspace), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementVspace) } }, |
127 | { "width" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAppletElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAppletElementWidth) } }, |
128 | }; |
129 | |
130 | const ClassInfo JSHTMLAppletElementPrototype::s_info = { "HTMLAppletElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLAppletElementPrototype) }; |
131 | |
132 | void JSHTMLAppletElementPrototype::finishCreation(VM& vm) |
133 | { |
134 | Base::finishCreation(vm); |
135 | reifyStaticProperties(vm, JSHTMLAppletElement::info(), JSHTMLAppletElementPrototypeTableValues, *this); |
136 | } |
137 | |
138 | const ClassInfo JSHTMLAppletElement::s_info = { "HTMLAppletElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLAppletElement) }; |
139 | |
140 | JSHTMLAppletElement::JSHTMLAppletElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLAppletElement>&& impl) |
141 | : JSHTMLElement(structure, globalObject, WTFMove(impl)) |
142 | { |
143 | } |
144 | |
145 | void JSHTMLAppletElement::finishCreation(VM& vm) |
146 | { |
147 | Base::finishCreation(vm); |
148 | ASSERT(inherits(vm, info())); |
149 | |
150 | } |
151 | |
152 | JSObject* JSHTMLAppletElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
153 | { |
154 | return JSHTMLAppletElementPrototype::create(vm, &globalObject, JSHTMLAppletElementPrototype::createStructure(vm, &globalObject, JSHTMLElement::prototype(vm, globalObject))); |
155 | } |
156 | |
157 | JSObject* JSHTMLAppletElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
158 | { |
159 | return getDOMPrototype<JSHTMLAppletElement>(vm, globalObject); |
160 | } |
161 | |
162 | JSValue JSHTMLAppletElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
163 | { |
164 | return getDOMConstructor<JSHTMLAppletElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
165 | } |
166 | |
167 | bool JSHTMLAppletElement::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot) |
168 | { |
169 | auto* thisObject = jsCast<JSHTMLAppletElement*>(object); |
170 | ASSERT_GC_OBJECT_INHERITS(thisObject, info()); |
171 | if (pluginElementCustomGetOwnPropertySlot(thisObject, state, propertyName, slot)) |
172 | return true; |
173 | return JSObject::getOwnPropertySlot(object, state, propertyName, slot); |
174 | } |
175 | |
176 | bool JSHTMLAppletElement::getOwnPropertySlotByIndex(JSObject* object, ExecState* state, unsigned index, PropertySlot& slot) |
177 | { |
178 | auto* thisObject = jsCast<JSHTMLAppletElement*>(object); |
179 | ASSERT_GC_OBJECT_INHERITS(thisObject, info()); |
180 | auto propertyName = Identifier::from(state, index); |
181 | if (pluginElementCustomGetOwnPropertySlot(thisObject, state, propertyName, slot)) |
182 | return true; |
183 | return JSObject::getOwnPropertySlotByIndex(object, state, index, slot); |
184 | } |
185 | |
186 | bool JSHTMLAppletElement::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& putPropertySlot) |
187 | { |
188 | auto* thisObject = jsCast<JSHTMLAppletElement*>(cell); |
189 | ASSERT_GC_OBJECT_INHERITS(thisObject, info()); |
190 | |
191 | bool putResult = false; |
192 | if (pluginElementCustomPut(thisObject, state, propertyName, value, putPropertySlot, putResult)) |
193 | return putResult; |
194 | |
195 | return JSObject::put(thisObject, state, propertyName, value, putPropertySlot); |
196 | } |
197 | |
198 | bool JSHTMLAppletElement::putByIndex(JSCell* cell, ExecState* state, unsigned index, JSValue value, bool shouldThrow) |
199 | { |
200 | auto* thisObject = jsCast<JSHTMLAppletElement*>(cell); |
201 | ASSERT_GC_OBJECT_INHERITS(thisObject, info()); |
202 | |
203 | auto propertyName = Identifier::from(state, index); |
204 | PutPropertySlot putPropertySlot(thisObject, shouldThrow); |
205 | bool putResult = false; |
206 | if (pluginElementCustomPut(thisObject, state, propertyName, value, putPropertySlot, putResult)) |
207 | return putResult; |
208 | |
209 | return JSObject::putByIndex(cell, state, index, value, shouldThrow); |
210 | } |
211 | |
212 | CallType JSHTMLAppletElement::getCallData(JSCell* cell, CallData& callData) |
213 | { |
214 | auto* thisObject = jsCast<JSHTMLAppletElement*>(cell); |
215 | ASSERT_GC_OBJECT_INHERITS(thisObject, info()); |
216 | |
217 | return pluginElementCustomGetCallData(thisObject, callData); |
218 | } |
219 | |
220 | template<> inline JSHTMLAppletElement* IDLAttribute<JSHTMLAppletElement>::cast(ExecState& state, EncodedJSValue thisValue) |
221 | { |
222 | return jsDynamicCast<JSHTMLAppletElement*>(state.vm(), JSValue::decode(thisValue)); |
223 | } |
224 | |
225 | EncodedJSValue jsHTMLAppletElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
226 | { |
227 | VM& vm = state->vm(); |
228 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
229 | auto* prototype = jsDynamicCast<JSHTMLAppletElementPrototype*>(vm, JSValue::decode(thisValue)); |
230 | if (UNLIKELY(!prototype)) |
231 | return throwVMTypeError(state, throwScope); |
232 | return JSValue::encode(JSHTMLAppletElement::getConstructor(state->vm(), prototype->globalObject())); |
233 | } |
234 | |
235 | bool setJSHTMLAppletElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
236 | { |
237 | VM& vm = state->vm(); |
238 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
239 | auto* prototype = jsDynamicCast<JSHTMLAppletElementPrototype*>(vm, JSValue::decode(thisValue)); |
240 | if (UNLIKELY(!prototype)) { |
241 | throwVMTypeError(state, throwScope); |
242 | return false; |
243 | } |
244 | // Shadowing a built-in constructor |
245 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
246 | } |
247 | |
248 | static inline JSValue jsHTMLAppletElementAlignGetter(ExecState& state, JSHTMLAppletElement& thisObject, ThrowScope& throwScope) |
249 | { |
250 | UNUSED_PARAM(throwScope); |
251 | UNUSED_PARAM(state); |
252 | auto& impl = thisObject.wrapped(); |
253 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::alignAttr)); |
254 | return result; |
255 | } |
256 | |
257 | EncodedJSValue jsHTMLAppletElementAlign(ExecState* state, EncodedJSValue thisValue, PropertyName) |
258 | { |
259 | return IDLAttribute<JSHTMLAppletElement>::get<jsHTMLAppletElementAlignGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "align" ); |
260 | } |
261 | |
262 | static inline bool setJSHTMLAppletElementAlignSetter(ExecState& state, JSHTMLAppletElement& thisObject, JSValue value, ThrowScope& throwScope) |
263 | { |
264 | UNUSED_PARAM(throwScope); |
265 | auto& impl = thisObject.wrapped(); |
266 | auto nativeValue = convert<IDLDOMString>(state, value); |
267 | RETURN_IF_EXCEPTION(throwScope, false); |
268 | AttributeSetter::call(state, throwScope, [&] { |
269 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::alignAttr, WTFMove(nativeValue)); |
270 | }); |
271 | return true; |
272 | } |
273 | |
274 | bool setJSHTMLAppletElementAlign(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
275 | { |
276 | return IDLAttribute<JSHTMLAppletElement>::set<setJSHTMLAppletElementAlignSetter>(*state, thisValue, encodedValue, "align" ); |
277 | } |
278 | |
279 | static inline JSValue jsHTMLAppletElementAltGetter(ExecState& state, JSHTMLAppletElement& thisObject, ThrowScope& throwScope) |
280 | { |
281 | UNUSED_PARAM(throwScope); |
282 | UNUSED_PARAM(state); |
283 | auto& impl = thisObject.wrapped(); |
284 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::altAttr)); |
285 | return result; |
286 | } |
287 | |
288 | EncodedJSValue jsHTMLAppletElementAlt(ExecState* state, EncodedJSValue thisValue, PropertyName) |
289 | { |
290 | return IDLAttribute<JSHTMLAppletElement>::get<jsHTMLAppletElementAltGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "alt" ); |
291 | } |
292 | |
293 | static inline bool setJSHTMLAppletElementAltSetter(ExecState& state, JSHTMLAppletElement& thisObject, JSValue value, ThrowScope& throwScope) |
294 | { |
295 | UNUSED_PARAM(throwScope); |
296 | auto& impl = thisObject.wrapped(); |
297 | auto nativeValue = convert<IDLDOMString>(state, value); |
298 | RETURN_IF_EXCEPTION(throwScope, false); |
299 | AttributeSetter::call(state, throwScope, [&] { |
300 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::altAttr, WTFMove(nativeValue)); |
301 | }); |
302 | return true; |
303 | } |
304 | |
305 | bool setJSHTMLAppletElementAlt(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
306 | { |
307 | return IDLAttribute<JSHTMLAppletElement>::set<setJSHTMLAppletElementAltSetter>(*state, thisValue, encodedValue, "alt" ); |
308 | } |
309 | |
310 | static inline JSValue jsHTMLAppletElementArchiveGetter(ExecState& state, JSHTMLAppletElement& thisObject, ThrowScope& throwScope) |
311 | { |
312 | UNUSED_PARAM(throwScope); |
313 | UNUSED_PARAM(state); |
314 | auto& impl = thisObject.wrapped(); |
315 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::archiveAttr)); |
316 | return result; |
317 | } |
318 | |
319 | EncodedJSValue jsHTMLAppletElementArchive(ExecState* state, EncodedJSValue thisValue, PropertyName) |
320 | { |
321 | return IDLAttribute<JSHTMLAppletElement>::get<jsHTMLAppletElementArchiveGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "archive" ); |
322 | } |
323 | |
324 | static inline bool setJSHTMLAppletElementArchiveSetter(ExecState& state, JSHTMLAppletElement& thisObject, JSValue value, ThrowScope& throwScope) |
325 | { |
326 | UNUSED_PARAM(throwScope); |
327 | auto& impl = thisObject.wrapped(); |
328 | auto nativeValue = convert<IDLDOMString>(state, value); |
329 | RETURN_IF_EXCEPTION(throwScope, false); |
330 | AttributeSetter::call(state, throwScope, [&] { |
331 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::archiveAttr, WTFMove(nativeValue)); |
332 | }); |
333 | return true; |
334 | } |
335 | |
336 | bool setJSHTMLAppletElementArchive(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
337 | { |
338 | return IDLAttribute<JSHTMLAppletElement>::set<setJSHTMLAppletElementArchiveSetter>(*state, thisValue, encodedValue, "archive" ); |
339 | } |
340 | |
341 | static inline JSValue jsHTMLAppletElementCodeGetter(ExecState& state, JSHTMLAppletElement& thisObject, ThrowScope& throwScope) |
342 | { |
343 | UNUSED_PARAM(throwScope); |
344 | UNUSED_PARAM(state); |
345 | auto& impl = thisObject.wrapped(); |
346 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::codeAttr)); |
347 | return result; |
348 | } |
349 | |
350 | EncodedJSValue jsHTMLAppletElementCode(ExecState* state, EncodedJSValue thisValue, PropertyName) |
351 | { |
352 | return IDLAttribute<JSHTMLAppletElement>::get<jsHTMLAppletElementCodeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "code" ); |
353 | } |
354 | |
355 | static inline bool setJSHTMLAppletElementCodeSetter(ExecState& state, JSHTMLAppletElement& thisObject, JSValue value, ThrowScope& throwScope) |
356 | { |
357 | UNUSED_PARAM(throwScope); |
358 | auto& impl = thisObject.wrapped(); |
359 | auto nativeValue = convert<IDLDOMString>(state, value); |
360 | RETURN_IF_EXCEPTION(throwScope, false); |
361 | AttributeSetter::call(state, throwScope, [&] { |
362 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::codeAttr, WTFMove(nativeValue)); |
363 | }); |
364 | return true; |
365 | } |
366 | |
367 | bool setJSHTMLAppletElementCode(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
368 | { |
369 | return IDLAttribute<JSHTMLAppletElement>::set<setJSHTMLAppletElementCodeSetter>(*state, thisValue, encodedValue, "code" ); |
370 | } |
371 | |
372 | static inline JSValue jsHTMLAppletElementCodeBaseGetter(ExecState& state, JSHTMLAppletElement& thisObject, ThrowScope& throwScope) |
373 | { |
374 | UNUSED_PARAM(throwScope); |
375 | UNUSED_PARAM(state); |
376 | auto& impl = thisObject.wrapped(); |
377 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.getURLAttribute(WebCore::HTMLNames::codebaseAttr)); |
378 | return result; |
379 | } |
380 | |
381 | EncodedJSValue jsHTMLAppletElementCodeBase(ExecState* state, EncodedJSValue thisValue, PropertyName) |
382 | { |
383 | return IDLAttribute<JSHTMLAppletElement>::get<jsHTMLAppletElementCodeBaseGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "codeBase" ); |
384 | } |
385 | |
386 | static inline bool setJSHTMLAppletElementCodeBaseSetter(ExecState& state, JSHTMLAppletElement& thisObject, JSValue value, ThrowScope& throwScope) |
387 | { |
388 | UNUSED_PARAM(throwScope); |
389 | auto& impl = thisObject.wrapped(); |
390 | auto nativeValue = convert<IDLUSVString>(state, value); |
391 | RETURN_IF_EXCEPTION(throwScope, false); |
392 | AttributeSetter::call(state, throwScope, [&] { |
393 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::codebaseAttr, WTFMove(nativeValue)); |
394 | }); |
395 | return true; |
396 | } |
397 | |
398 | bool setJSHTMLAppletElementCodeBase(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
399 | { |
400 | return IDLAttribute<JSHTMLAppletElement>::set<setJSHTMLAppletElementCodeBaseSetter>(*state, thisValue, encodedValue, "codeBase" ); |
401 | } |
402 | |
403 | static inline JSValue jsHTMLAppletElementHeightGetter(ExecState& state, JSHTMLAppletElement& thisObject, ThrowScope& throwScope) |
404 | { |
405 | UNUSED_PARAM(throwScope); |
406 | UNUSED_PARAM(state); |
407 | auto& impl = thisObject.wrapped(); |
408 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::heightAttr)); |
409 | return result; |
410 | } |
411 | |
412 | EncodedJSValue jsHTMLAppletElementHeight(ExecState* state, EncodedJSValue thisValue, PropertyName) |
413 | { |
414 | return IDLAttribute<JSHTMLAppletElement>::get<jsHTMLAppletElementHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "height" ); |
415 | } |
416 | |
417 | static inline bool setJSHTMLAppletElementHeightSetter(ExecState& state, JSHTMLAppletElement& thisObject, JSValue value, ThrowScope& throwScope) |
418 | { |
419 | UNUSED_PARAM(throwScope); |
420 | auto& impl = thisObject.wrapped(); |
421 | auto nativeValue = convert<IDLDOMString>(state, value); |
422 | RETURN_IF_EXCEPTION(throwScope, false); |
423 | AttributeSetter::call(state, throwScope, [&] { |
424 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::heightAttr, WTFMove(nativeValue)); |
425 | }); |
426 | return true; |
427 | } |
428 | |
429 | bool setJSHTMLAppletElementHeight(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
430 | { |
431 | return IDLAttribute<JSHTMLAppletElement>::set<setJSHTMLAppletElementHeightSetter>(*state, thisValue, encodedValue, "height" ); |
432 | } |
433 | |
434 | static inline JSValue jsHTMLAppletElementHspaceGetter(ExecState& state, JSHTMLAppletElement& thisObject, ThrowScope& throwScope) |
435 | { |
436 | UNUSED_PARAM(throwScope); |
437 | UNUSED_PARAM(state); |
438 | auto& impl = thisObject.wrapped(); |
439 | JSValue result = toJS<IDLUnsignedLong>(state, throwScope, std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::hspaceAttr))); |
440 | return result; |
441 | } |
442 | |
443 | EncodedJSValue jsHTMLAppletElementHspace(ExecState* state, EncodedJSValue thisValue, PropertyName) |
444 | { |
445 | return IDLAttribute<JSHTMLAppletElement>::get<jsHTMLAppletElementHspaceGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "hspace" ); |
446 | } |
447 | |
448 | static inline bool setJSHTMLAppletElementHspaceSetter(ExecState& state, JSHTMLAppletElement& thisObject, JSValue value, ThrowScope& throwScope) |
449 | { |
450 | UNUSED_PARAM(throwScope); |
451 | auto& impl = thisObject.wrapped(); |
452 | auto nativeValue = convert<IDLUnsignedLong>(state, value); |
453 | RETURN_IF_EXCEPTION(throwScope, false); |
454 | AttributeSetter::call(state, throwScope, [&] { |
455 | return impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::hspaceAttr, WTFMove(nativeValue)); |
456 | }); |
457 | return true; |
458 | } |
459 | |
460 | bool setJSHTMLAppletElementHspace(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
461 | { |
462 | return IDLAttribute<JSHTMLAppletElement>::set<setJSHTMLAppletElementHspaceSetter>(*state, thisValue, encodedValue, "hspace" ); |
463 | } |
464 | |
465 | static inline JSValue jsHTMLAppletElementNameGetter(ExecState& state, JSHTMLAppletElement& thisObject, ThrowScope& throwScope) |
466 | { |
467 | UNUSED_PARAM(throwScope); |
468 | UNUSED_PARAM(state); |
469 | auto& impl = thisObject.wrapped(); |
470 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.getNameAttribute()); |
471 | return result; |
472 | } |
473 | |
474 | EncodedJSValue jsHTMLAppletElementName(ExecState* state, EncodedJSValue thisValue, PropertyName) |
475 | { |
476 | return IDLAttribute<JSHTMLAppletElement>::get<jsHTMLAppletElementNameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "name" ); |
477 | } |
478 | |
479 | static inline bool setJSHTMLAppletElementNameSetter(ExecState& state, JSHTMLAppletElement& thisObject, JSValue value, ThrowScope& throwScope) |
480 | { |
481 | UNUSED_PARAM(throwScope); |
482 | auto& impl = thisObject.wrapped(); |
483 | auto nativeValue = convert<IDLDOMString>(state, value); |
484 | RETURN_IF_EXCEPTION(throwScope, false); |
485 | AttributeSetter::call(state, throwScope, [&] { |
486 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::nameAttr, WTFMove(nativeValue)); |
487 | }); |
488 | return true; |
489 | } |
490 | |
491 | bool setJSHTMLAppletElementName(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
492 | { |
493 | return IDLAttribute<JSHTMLAppletElement>::set<setJSHTMLAppletElementNameSetter>(*state, thisValue, encodedValue, "name" ); |
494 | } |
495 | |
496 | static inline JSValue jsHTMLAppletElementObjectGetter(ExecState& state, JSHTMLAppletElement& thisObject, ThrowScope& throwScope) |
497 | { |
498 | UNUSED_PARAM(throwScope); |
499 | UNUSED_PARAM(state); |
500 | auto& impl = thisObject.wrapped(); |
501 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.getURLAttribute(WebCore::HTMLNames::objectAttr)); |
502 | return result; |
503 | } |
504 | |
505 | EncodedJSValue jsHTMLAppletElementObject(ExecState* state, EncodedJSValue thisValue, PropertyName) |
506 | { |
507 | return IDLAttribute<JSHTMLAppletElement>::get<jsHTMLAppletElementObjectGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "object" ); |
508 | } |
509 | |
510 | static inline bool setJSHTMLAppletElementObjectSetter(ExecState& state, JSHTMLAppletElement& thisObject, JSValue value, ThrowScope& throwScope) |
511 | { |
512 | UNUSED_PARAM(throwScope); |
513 | auto& impl = thisObject.wrapped(); |
514 | auto nativeValue = convert<IDLUSVString>(state, value); |
515 | RETURN_IF_EXCEPTION(throwScope, false); |
516 | AttributeSetter::call(state, throwScope, [&] { |
517 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::objectAttr, WTFMove(nativeValue)); |
518 | }); |
519 | return true; |
520 | } |
521 | |
522 | bool setJSHTMLAppletElementObject(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
523 | { |
524 | return IDLAttribute<JSHTMLAppletElement>::set<setJSHTMLAppletElementObjectSetter>(*state, thisValue, encodedValue, "object" ); |
525 | } |
526 | |
527 | static inline JSValue jsHTMLAppletElementVspaceGetter(ExecState& state, JSHTMLAppletElement& thisObject, ThrowScope& throwScope) |
528 | { |
529 | UNUSED_PARAM(throwScope); |
530 | UNUSED_PARAM(state); |
531 | auto& impl = thisObject.wrapped(); |
532 | JSValue result = toJS<IDLUnsignedLong>(state, throwScope, std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::vspaceAttr))); |
533 | return result; |
534 | } |
535 | |
536 | EncodedJSValue jsHTMLAppletElementVspace(ExecState* state, EncodedJSValue thisValue, PropertyName) |
537 | { |
538 | return IDLAttribute<JSHTMLAppletElement>::get<jsHTMLAppletElementVspaceGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "vspace" ); |
539 | } |
540 | |
541 | static inline bool setJSHTMLAppletElementVspaceSetter(ExecState& state, JSHTMLAppletElement& thisObject, JSValue value, ThrowScope& throwScope) |
542 | { |
543 | UNUSED_PARAM(throwScope); |
544 | auto& impl = thisObject.wrapped(); |
545 | auto nativeValue = convert<IDLUnsignedLong>(state, value); |
546 | RETURN_IF_EXCEPTION(throwScope, false); |
547 | AttributeSetter::call(state, throwScope, [&] { |
548 | return impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::vspaceAttr, WTFMove(nativeValue)); |
549 | }); |
550 | return true; |
551 | } |
552 | |
553 | bool setJSHTMLAppletElementVspace(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
554 | { |
555 | return IDLAttribute<JSHTMLAppletElement>::set<setJSHTMLAppletElementVspaceSetter>(*state, thisValue, encodedValue, "vspace" ); |
556 | } |
557 | |
558 | static inline JSValue jsHTMLAppletElementWidthGetter(ExecState& state, JSHTMLAppletElement& thisObject, ThrowScope& throwScope) |
559 | { |
560 | UNUSED_PARAM(throwScope); |
561 | UNUSED_PARAM(state); |
562 | auto& impl = thisObject.wrapped(); |
563 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::widthAttr)); |
564 | return result; |
565 | } |
566 | |
567 | EncodedJSValue jsHTMLAppletElementWidth(ExecState* state, EncodedJSValue thisValue, PropertyName) |
568 | { |
569 | return IDLAttribute<JSHTMLAppletElement>::get<jsHTMLAppletElementWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "width" ); |
570 | } |
571 | |
572 | static inline bool setJSHTMLAppletElementWidthSetter(ExecState& state, JSHTMLAppletElement& thisObject, JSValue value, ThrowScope& throwScope) |
573 | { |
574 | UNUSED_PARAM(throwScope); |
575 | auto& impl = thisObject.wrapped(); |
576 | auto nativeValue = convert<IDLDOMString>(state, value); |
577 | RETURN_IF_EXCEPTION(throwScope, false); |
578 | AttributeSetter::call(state, throwScope, [&] { |
579 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::widthAttr, WTFMove(nativeValue)); |
580 | }); |
581 | return true; |
582 | } |
583 | |
584 | bool setJSHTMLAppletElementWidth(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
585 | { |
586 | return IDLAttribute<JSHTMLAppletElement>::set<setJSHTMLAppletElementWidthSetter>(*state, thisValue, encodedValue, "width" ); |
587 | } |
588 | |
589 | void JSHTMLAppletElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
590 | { |
591 | auto* thisObject = jsCast<JSHTMLAppletElement*>(cell); |
592 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
593 | if (thisObject->scriptExecutionContext()) |
594 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
595 | Base::heapSnapshot(cell, builder); |
596 | } |
597 | |
598 | |
599 | } |
600 | |