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 "JSHTMLMarqueeElement.h"
23
24#include "CustomElementReactionQueue.h"
25#include "HTMLNames.h"
26#include "JSDOMAttribute.h"
27#include "JSDOMBinding.h"
28#include "JSDOMConstructorNotConstructable.h"
29#include "JSDOMConvertBoolean.h"
30#include "JSDOMConvertNumbers.h"
31#include "JSDOMConvertStrings.h"
32#include "JSDOMExceptionHandling.h"
33#include "JSDOMOperation.h"
34#include "JSDOMWrapperCache.h"
35#include "ScriptExecutionContext.h"
36#include <JavaScriptCore/HeapSnapshotBuilder.h>
37#include <JavaScriptCore/JSCInlines.h>
38#include <wtf/GetPtr.h>
39#include <wtf/PointerPreparations.h>
40#include <wtf/URL.h>
41
42
43namespace WebCore {
44using namespace JSC;
45
46// Functions
47
48JSC::EncodedJSValue JSC_HOST_CALL jsHTMLMarqueeElementPrototypeFunctionStart(JSC::ExecState*);
49JSC::EncodedJSValue JSC_HOST_CALL jsHTMLMarqueeElementPrototypeFunctionStop(JSC::ExecState*);
50
51// Attributes
52
53JSC::EncodedJSValue jsHTMLMarqueeElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
54bool setJSHTMLMarqueeElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
55JSC::EncodedJSValue jsHTMLMarqueeElementBehavior(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
56bool setJSHTMLMarqueeElementBehavior(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
57JSC::EncodedJSValue jsHTMLMarqueeElementBgColor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
58bool setJSHTMLMarqueeElementBgColor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
59JSC::EncodedJSValue jsHTMLMarqueeElementDirection(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
60bool setJSHTMLMarqueeElementDirection(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
61JSC::EncodedJSValue jsHTMLMarqueeElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
62bool setJSHTMLMarqueeElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
63JSC::EncodedJSValue jsHTMLMarqueeElementHspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
64bool setJSHTMLMarqueeElementHspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
65JSC::EncodedJSValue jsHTMLMarqueeElementLoop(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
66bool setJSHTMLMarqueeElementLoop(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
67JSC::EncodedJSValue jsHTMLMarqueeElementScrollAmount(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
68bool setJSHTMLMarqueeElementScrollAmount(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
69JSC::EncodedJSValue jsHTMLMarqueeElementScrollDelay(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
70bool setJSHTMLMarqueeElementScrollDelay(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
71JSC::EncodedJSValue jsHTMLMarqueeElementTrueSpeed(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
72bool setJSHTMLMarqueeElementTrueSpeed(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
73JSC::EncodedJSValue jsHTMLMarqueeElementVspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
74bool setJSHTMLMarqueeElementVspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
75JSC::EncodedJSValue jsHTMLMarqueeElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
76bool setJSHTMLMarqueeElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
77
78class JSHTMLMarqueeElementPrototype : public JSC::JSNonFinalObject {
79public:
80 using Base = JSC::JSNonFinalObject;
81 static JSHTMLMarqueeElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
82 {
83 JSHTMLMarqueeElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLMarqueeElementPrototype>(vm.heap)) JSHTMLMarqueeElementPrototype(vm, globalObject, structure);
84 ptr->finishCreation(vm);
85 return ptr;
86 }
87
88 DECLARE_INFO;
89 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
90 {
91 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
92 }
93
94private:
95 JSHTMLMarqueeElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
96 : JSC::JSNonFinalObject(vm, structure)
97 {
98 }
99
100 void finishCreation(JSC::VM&);
101};
102
103using JSHTMLMarqueeElementConstructor = JSDOMConstructorNotConstructable<JSHTMLMarqueeElement>;
104
105template<> JSValue JSHTMLMarqueeElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
106{
107 return JSHTMLElement::getConstructor(vm, &globalObject);
108}
109
110template<> void JSHTMLMarqueeElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
111{
112 putDirect(vm, vm.propertyNames->prototype, JSHTMLMarqueeElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
113 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("HTMLMarqueeElement"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
114 putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
115}
116
117template<> const ClassInfo JSHTMLMarqueeElementConstructor::s_info = { "HTMLMarqueeElement", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLMarqueeElementConstructor) };
118
119/* Hash table for prototype */
120
121static const HashTableValue JSHTMLMarqueeElementPrototypeTableValues[] =
122{
123 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementConstructor) } },
124 { "behavior", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementBehavior), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementBehavior) } },
125 { "bgColor", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementBgColor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementBgColor) } },
126 { "direction", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementDirection), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementDirection) } },
127 { "height", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementHeight) } },
128 { "hspace", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementHspace), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementHspace) } },
129 { "loop", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementLoop), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementLoop) } },
130 { "scrollAmount", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementScrollAmount), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementScrollAmount) } },
131 { "scrollDelay", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementScrollDelay), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementScrollDelay) } },
132 { "trueSpeed", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementTrueSpeed), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementTrueSpeed) } },
133 { "vspace", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementVspace), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementVspace) } },
134 { "width", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementWidth) } },
135 { "start", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLMarqueeElementPrototypeFunctionStart), (intptr_t) (0) } },
136 { "stop", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLMarqueeElementPrototypeFunctionStop), (intptr_t) (0) } },
137};
138
139const ClassInfo JSHTMLMarqueeElementPrototype::s_info = { "HTMLMarqueeElementPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLMarqueeElementPrototype) };
140
141void JSHTMLMarqueeElementPrototype::finishCreation(VM& vm)
142{
143 Base::finishCreation(vm);
144 reifyStaticProperties(vm, JSHTMLMarqueeElement::info(), JSHTMLMarqueeElementPrototypeTableValues, *this);
145}
146
147const ClassInfo JSHTMLMarqueeElement::s_info = { "HTMLMarqueeElement", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLMarqueeElement) };
148
149JSHTMLMarqueeElement::JSHTMLMarqueeElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLMarqueeElement>&& impl)
150 : JSHTMLElement(structure, globalObject, WTFMove(impl))
151{
152}
153
154void JSHTMLMarqueeElement::finishCreation(VM& vm)
155{
156 Base::finishCreation(vm);
157 ASSERT(inherits(vm, info()));
158
159}
160
161JSObject* JSHTMLMarqueeElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
162{
163 return JSHTMLMarqueeElementPrototype::create(vm, &globalObject, JSHTMLMarqueeElementPrototype::createStructure(vm, &globalObject, JSHTMLElement::prototype(vm, globalObject)));
164}
165
166JSObject* JSHTMLMarqueeElement::prototype(VM& vm, JSDOMGlobalObject& globalObject)
167{
168 return getDOMPrototype<JSHTMLMarqueeElement>(vm, globalObject);
169}
170
171JSValue JSHTMLMarqueeElement::getConstructor(VM& vm, const JSGlobalObject* globalObject)
172{
173 return getDOMConstructor<JSHTMLMarqueeElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
174}
175
176template<> inline JSHTMLMarqueeElement* IDLAttribute<JSHTMLMarqueeElement>::cast(ExecState& state, EncodedJSValue thisValue)
177{
178 return jsDynamicCast<JSHTMLMarqueeElement*>(state.vm(), JSValue::decode(thisValue));
179}
180
181template<> inline JSHTMLMarqueeElement* IDLOperation<JSHTMLMarqueeElement>::cast(ExecState& state)
182{
183 return jsDynamicCast<JSHTMLMarqueeElement*>(state.vm(), state.thisValue());
184}
185
186EncodedJSValue jsHTMLMarqueeElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
187{
188 VM& vm = state->vm();
189 auto throwScope = DECLARE_THROW_SCOPE(vm);
190 auto* prototype = jsDynamicCast<JSHTMLMarqueeElementPrototype*>(vm, JSValue::decode(thisValue));
191 if (UNLIKELY(!prototype))
192 return throwVMTypeError(state, throwScope);
193 return JSValue::encode(JSHTMLMarqueeElement::getConstructor(state->vm(), prototype->globalObject()));
194}
195
196bool setJSHTMLMarqueeElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
197{
198 VM& vm = state->vm();
199 auto throwScope = DECLARE_THROW_SCOPE(vm);
200 auto* prototype = jsDynamicCast<JSHTMLMarqueeElementPrototype*>(vm, JSValue::decode(thisValue));
201 if (UNLIKELY(!prototype)) {
202 throwVMTypeError(state, throwScope);
203 return false;
204 }
205 // Shadowing a built-in constructor
206 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
207}
208
209static inline JSValue jsHTMLMarqueeElementBehaviorGetter(ExecState& state, JSHTMLMarqueeElement& thisObject, ThrowScope& throwScope)
210{
211 UNUSED_PARAM(throwScope);
212 UNUSED_PARAM(state);
213 auto& impl = thisObject.wrapped();
214 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::behaviorAttr));
215 return result;
216}
217
218EncodedJSValue jsHTMLMarqueeElementBehavior(ExecState* state, EncodedJSValue thisValue, PropertyName)
219{
220 return IDLAttribute<JSHTMLMarqueeElement>::get<jsHTMLMarqueeElementBehaviorGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "behavior");
221}
222
223static inline bool setJSHTMLMarqueeElementBehaviorSetter(ExecState& state, JSHTMLMarqueeElement& thisObject, JSValue value, ThrowScope& throwScope)
224{
225 UNUSED_PARAM(throwScope);
226 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
227 auto& impl = thisObject.wrapped();
228 auto nativeValue = convert<IDLDOMString>(state, value);
229 RETURN_IF_EXCEPTION(throwScope, false);
230 AttributeSetter::call(state, throwScope, [&] {
231 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::behaviorAttr, WTFMove(nativeValue));
232 });
233 return true;
234}
235
236bool setJSHTMLMarqueeElementBehavior(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
237{
238 return IDLAttribute<JSHTMLMarqueeElement>::set<setJSHTMLMarqueeElementBehaviorSetter>(*state, thisValue, encodedValue, "behavior");
239}
240
241static inline JSValue jsHTMLMarqueeElementBgColorGetter(ExecState& state, JSHTMLMarqueeElement& thisObject, ThrowScope& throwScope)
242{
243 UNUSED_PARAM(throwScope);
244 UNUSED_PARAM(state);
245 auto& impl = thisObject.wrapped();
246 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::bgcolorAttr));
247 return result;
248}
249
250EncodedJSValue jsHTMLMarqueeElementBgColor(ExecState* state, EncodedJSValue thisValue, PropertyName)
251{
252 return IDLAttribute<JSHTMLMarqueeElement>::get<jsHTMLMarqueeElementBgColorGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "bgColor");
253}
254
255static inline bool setJSHTMLMarqueeElementBgColorSetter(ExecState& state, JSHTMLMarqueeElement& thisObject, JSValue value, ThrowScope& throwScope)
256{
257 UNUSED_PARAM(throwScope);
258 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
259 auto& impl = thisObject.wrapped();
260 auto nativeValue = convert<IDLDOMString>(state, value);
261 RETURN_IF_EXCEPTION(throwScope, false);
262 AttributeSetter::call(state, throwScope, [&] {
263 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::bgcolorAttr, WTFMove(nativeValue));
264 });
265 return true;
266}
267
268bool setJSHTMLMarqueeElementBgColor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
269{
270 return IDLAttribute<JSHTMLMarqueeElement>::set<setJSHTMLMarqueeElementBgColorSetter>(*state, thisValue, encodedValue, "bgColor");
271}
272
273static inline JSValue jsHTMLMarqueeElementDirectionGetter(ExecState& state, JSHTMLMarqueeElement& thisObject, ThrowScope& throwScope)
274{
275 UNUSED_PARAM(throwScope);
276 UNUSED_PARAM(state);
277 auto& impl = thisObject.wrapped();
278 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::directionAttr));
279 return result;
280}
281
282EncodedJSValue jsHTMLMarqueeElementDirection(ExecState* state, EncodedJSValue thisValue, PropertyName)
283{
284 return IDLAttribute<JSHTMLMarqueeElement>::get<jsHTMLMarqueeElementDirectionGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "direction");
285}
286
287static inline bool setJSHTMLMarqueeElementDirectionSetter(ExecState& state, JSHTMLMarqueeElement& thisObject, JSValue value, ThrowScope& throwScope)
288{
289 UNUSED_PARAM(throwScope);
290 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
291 auto& impl = thisObject.wrapped();
292 auto nativeValue = convert<IDLDOMString>(state, value);
293 RETURN_IF_EXCEPTION(throwScope, false);
294 AttributeSetter::call(state, throwScope, [&] {
295 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::directionAttr, WTFMove(nativeValue));
296 });
297 return true;
298}
299
300bool setJSHTMLMarqueeElementDirection(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
301{
302 return IDLAttribute<JSHTMLMarqueeElement>::set<setJSHTMLMarqueeElementDirectionSetter>(*state, thisValue, encodedValue, "direction");
303}
304
305static inline JSValue jsHTMLMarqueeElementHeightGetter(ExecState& state, JSHTMLMarqueeElement& thisObject, ThrowScope& throwScope)
306{
307 UNUSED_PARAM(throwScope);
308 UNUSED_PARAM(state);
309 auto& impl = thisObject.wrapped();
310 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::heightAttr));
311 return result;
312}
313
314EncodedJSValue jsHTMLMarqueeElementHeight(ExecState* state, EncodedJSValue thisValue, PropertyName)
315{
316 return IDLAttribute<JSHTMLMarqueeElement>::get<jsHTMLMarqueeElementHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "height");
317}
318
319static inline bool setJSHTMLMarqueeElementHeightSetter(ExecState& state, JSHTMLMarqueeElement& thisObject, JSValue value, ThrowScope& throwScope)
320{
321 UNUSED_PARAM(throwScope);
322 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
323 auto& impl = thisObject.wrapped();
324 auto nativeValue = convert<IDLDOMString>(state, value);
325 RETURN_IF_EXCEPTION(throwScope, false);
326 AttributeSetter::call(state, throwScope, [&] {
327 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::heightAttr, WTFMove(nativeValue));
328 });
329 return true;
330}
331
332bool setJSHTMLMarqueeElementHeight(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
333{
334 return IDLAttribute<JSHTMLMarqueeElement>::set<setJSHTMLMarqueeElementHeightSetter>(*state, thisValue, encodedValue, "height");
335}
336
337static inline JSValue jsHTMLMarqueeElementHspaceGetter(ExecState& state, JSHTMLMarqueeElement& thisObject, ThrowScope& throwScope)
338{
339 UNUSED_PARAM(throwScope);
340 UNUSED_PARAM(state);
341 auto& impl = thisObject.wrapped();
342 JSValue result = toJS<IDLUnsignedLong>(state, throwScope, std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::hspaceAttr)));
343 return result;
344}
345
346EncodedJSValue jsHTMLMarqueeElementHspace(ExecState* state, EncodedJSValue thisValue, PropertyName)
347{
348 return IDLAttribute<JSHTMLMarqueeElement>::get<jsHTMLMarqueeElementHspaceGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "hspace");
349}
350
351static inline bool setJSHTMLMarqueeElementHspaceSetter(ExecState& state, JSHTMLMarqueeElement& thisObject, JSValue value, ThrowScope& throwScope)
352{
353 UNUSED_PARAM(throwScope);
354 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
355 auto& impl = thisObject.wrapped();
356 auto nativeValue = convert<IDLUnsignedLong>(state, value);
357 RETURN_IF_EXCEPTION(throwScope, false);
358 AttributeSetter::call(state, throwScope, [&] {
359 return impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::hspaceAttr, WTFMove(nativeValue));
360 });
361 return true;
362}
363
364bool setJSHTMLMarqueeElementHspace(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
365{
366 return IDLAttribute<JSHTMLMarqueeElement>::set<setJSHTMLMarqueeElementHspaceSetter>(*state, thisValue, encodedValue, "hspace");
367}
368
369static inline JSValue jsHTMLMarqueeElementLoopGetter(ExecState& state, JSHTMLMarqueeElement& thisObject, ThrowScope& throwScope)
370{
371 UNUSED_PARAM(throwScope);
372 UNUSED_PARAM(state);
373 auto& impl = thisObject.wrapped();
374 JSValue result = toJS<IDLLong>(state, throwScope, impl.loop());
375 return result;
376}
377
378EncodedJSValue jsHTMLMarqueeElementLoop(ExecState* state, EncodedJSValue thisValue, PropertyName)
379{
380 return IDLAttribute<JSHTMLMarqueeElement>::get<jsHTMLMarqueeElementLoopGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "loop");
381}
382
383static inline bool setJSHTMLMarqueeElementLoopSetter(ExecState& state, JSHTMLMarqueeElement& thisObject, JSValue value, ThrowScope& throwScope)
384{
385 UNUSED_PARAM(throwScope);
386 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
387 auto& impl = thisObject.wrapped();
388 auto nativeValue = convert<IDLLong>(state, value);
389 RETURN_IF_EXCEPTION(throwScope, false);
390 AttributeSetter::call(state, throwScope, [&] {
391 return impl.setLoop(WTFMove(nativeValue));
392 });
393 return true;
394}
395
396bool setJSHTMLMarqueeElementLoop(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
397{
398 return IDLAttribute<JSHTMLMarqueeElement>::set<setJSHTMLMarqueeElementLoopSetter>(*state, thisValue, encodedValue, "loop");
399}
400
401static inline JSValue jsHTMLMarqueeElementScrollAmountGetter(ExecState& state, JSHTMLMarqueeElement& thisObject, ThrowScope& throwScope)
402{
403 UNUSED_PARAM(throwScope);
404 UNUSED_PARAM(state);
405 auto& impl = thisObject.wrapped();
406 JSValue result = toJS<IDLUnsignedLong>(state, throwScope, impl.scrollAmount());
407 return result;
408}
409
410EncodedJSValue jsHTMLMarqueeElementScrollAmount(ExecState* state, EncodedJSValue thisValue, PropertyName)
411{
412 return IDLAttribute<JSHTMLMarqueeElement>::get<jsHTMLMarqueeElementScrollAmountGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "scrollAmount");
413}
414
415static inline bool setJSHTMLMarqueeElementScrollAmountSetter(ExecState& state, JSHTMLMarqueeElement& thisObject, JSValue value, ThrowScope& throwScope)
416{
417 UNUSED_PARAM(throwScope);
418 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
419 auto& impl = thisObject.wrapped();
420 auto nativeValue = convert<IDLUnsignedLong>(state, value);
421 RETURN_IF_EXCEPTION(throwScope, false);
422 AttributeSetter::call(state, throwScope, [&] {
423 return impl.setScrollAmount(WTFMove(nativeValue));
424 });
425 return true;
426}
427
428bool setJSHTMLMarqueeElementScrollAmount(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
429{
430 return IDLAttribute<JSHTMLMarqueeElement>::set<setJSHTMLMarqueeElementScrollAmountSetter>(*state, thisValue, encodedValue, "scrollAmount");
431}
432
433static inline JSValue jsHTMLMarqueeElementScrollDelayGetter(ExecState& state, JSHTMLMarqueeElement& thisObject, ThrowScope& throwScope)
434{
435 UNUSED_PARAM(throwScope);
436 UNUSED_PARAM(state);
437 auto& impl = thisObject.wrapped();
438 JSValue result = toJS<IDLUnsignedLong>(state, throwScope, impl.scrollDelay());
439 return result;
440}
441
442EncodedJSValue jsHTMLMarqueeElementScrollDelay(ExecState* state, EncodedJSValue thisValue, PropertyName)
443{
444 return IDLAttribute<JSHTMLMarqueeElement>::get<jsHTMLMarqueeElementScrollDelayGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "scrollDelay");
445}
446
447static inline bool setJSHTMLMarqueeElementScrollDelaySetter(ExecState& state, JSHTMLMarqueeElement& thisObject, JSValue value, ThrowScope& throwScope)
448{
449 UNUSED_PARAM(throwScope);
450 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
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.setScrollDelay(WTFMove(nativeValue));
456 });
457 return true;
458}
459
460bool setJSHTMLMarqueeElementScrollDelay(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
461{
462 return IDLAttribute<JSHTMLMarqueeElement>::set<setJSHTMLMarqueeElementScrollDelaySetter>(*state, thisValue, encodedValue, "scrollDelay");
463}
464
465static inline JSValue jsHTMLMarqueeElementTrueSpeedGetter(ExecState& state, JSHTMLMarqueeElement& thisObject, ThrowScope& throwScope)
466{
467 UNUSED_PARAM(throwScope);
468 UNUSED_PARAM(state);
469 auto& impl = thisObject.wrapped();
470 JSValue result = toJS<IDLBoolean>(state, throwScope, impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::truespeedAttr));
471 return result;
472}
473
474EncodedJSValue jsHTMLMarqueeElementTrueSpeed(ExecState* state, EncodedJSValue thisValue, PropertyName)
475{
476 return IDLAttribute<JSHTMLMarqueeElement>::get<jsHTMLMarqueeElementTrueSpeedGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "trueSpeed");
477}
478
479static inline bool setJSHTMLMarqueeElementTrueSpeedSetter(ExecState& state, JSHTMLMarqueeElement& thisObject, JSValue value, ThrowScope& throwScope)
480{
481 UNUSED_PARAM(throwScope);
482 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
483 auto& impl = thisObject.wrapped();
484 auto nativeValue = convert<IDLBoolean>(state, value);
485 RETURN_IF_EXCEPTION(throwScope, false);
486 AttributeSetter::call(state, throwScope, [&] {
487 return impl.setBooleanAttribute(WebCore::HTMLNames::truespeedAttr, WTFMove(nativeValue));
488 });
489 return true;
490}
491
492bool setJSHTMLMarqueeElementTrueSpeed(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
493{
494 return IDLAttribute<JSHTMLMarqueeElement>::set<setJSHTMLMarqueeElementTrueSpeedSetter>(*state, thisValue, encodedValue, "trueSpeed");
495}
496
497static inline JSValue jsHTMLMarqueeElementVspaceGetter(ExecState& state, JSHTMLMarqueeElement& thisObject, ThrowScope& throwScope)
498{
499 UNUSED_PARAM(throwScope);
500 UNUSED_PARAM(state);
501 auto& impl = thisObject.wrapped();
502 JSValue result = toJS<IDLUnsignedLong>(state, throwScope, std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::vspaceAttr)));
503 return result;
504}
505
506EncodedJSValue jsHTMLMarqueeElementVspace(ExecState* state, EncodedJSValue thisValue, PropertyName)
507{
508 return IDLAttribute<JSHTMLMarqueeElement>::get<jsHTMLMarqueeElementVspaceGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "vspace");
509}
510
511static inline bool setJSHTMLMarqueeElementVspaceSetter(ExecState& state, JSHTMLMarqueeElement& thisObject, JSValue value, ThrowScope& throwScope)
512{
513 UNUSED_PARAM(throwScope);
514 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
515 auto& impl = thisObject.wrapped();
516 auto nativeValue = convert<IDLUnsignedLong>(state, value);
517 RETURN_IF_EXCEPTION(throwScope, false);
518 AttributeSetter::call(state, throwScope, [&] {
519 return impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::vspaceAttr, WTFMove(nativeValue));
520 });
521 return true;
522}
523
524bool setJSHTMLMarqueeElementVspace(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
525{
526 return IDLAttribute<JSHTMLMarqueeElement>::set<setJSHTMLMarqueeElementVspaceSetter>(*state, thisValue, encodedValue, "vspace");
527}
528
529static inline JSValue jsHTMLMarqueeElementWidthGetter(ExecState& state, JSHTMLMarqueeElement& thisObject, ThrowScope& throwScope)
530{
531 UNUSED_PARAM(throwScope);
532 UNUSED_PARAM(state);
533 auto& impl = thisObject.wrapped();
534 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::widthAttr));
535 return result;
536}
537
538EncodedJSValue jsHTMLMarqueeElementWidth(ExecState* state, EncodedJSValue thisValue, PropertyName)
539{
540 return IDLAttribute<JSHTMLMarqueeElement>::get<jsHTMLMarqueeElementWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "width");
541}
542
543static inline bool setJSHTMLMarqueeElementWidthSetter(ExecState& state, JSHTMLMarqueeElement& thisObject, JSValue value, ThrowScope& throwScope)
544{
545 UNUSED_PARAM(throwScope);
546 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
547 auto& impl = thisObject.wrapped();
548 auto nativeValue = convert<IDLDOMString>(state, value);
549 RETURN_IF_EXCEPTION(throwScope, false);
550 AttributeSetter::call(state, throwScope, [&] {
551 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::widthAttr, WTFMove(nativeValue));
552 });
553 return true;
554}
555
556bool setJSHTMLMarqueeElementWidth(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
557{
558 return IDLAttribute<JSHTMLMarqueeElement>::set<setJSHTMLMarqueeElementWidthSetter>(*state, thisValue, encodedValue, "width");
559}
560
561static inline JSC::EncodedJSValue jsHTMLMarqueeElementPrototypeFunctionStartBody(JSC::ExecState* state, typename IDLOperation<JSHTMLMarqueeElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
562{
563 UNUSED_PARAM(state);
564 UNUSED_PARAM(throwScope);
565 auto& impl = castedThis->wrapped();
566 impl.start();
567 return JSValue::encode(jsUndefined());
568}
569
570EncodedJSValue JSC_HOST_CALL jsHTMLMarqueeElementPrototypeFunctionStart(ExecState* state)
571{
572 return IDLOperation<JSHTMLMarqueeElement>::call<jsHTMLMarqueeElementPrototypeFunctionStartBody>(*state, "start");
573}
574
575static inline JSC::EncodedJSValue jsHTMLMarqueeElementPrototypeFunctionStopBody(JSC::ExecState* state, typename IDLOperation<JSHTMLMarqueeElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
576{
577 UNUSED_PARAM(state);
578 UNUSED_PARAM(throwScope);
579 auto& impl = castedThis->wrapped();
580 impl.stop();
581 return JSValue::encode(jsUndefined());
582}
583
584EncodedJSValue JSC_HOST_CALL jsHTMLMarqueeElementPrototypeFunctionStop(ExecState* state)
585{
586 return IDLOperation<JSHTMLMarqueeElement>::call<jsHTMLMarqueeElementPrototypeFunctionStopBody>(*state, "stop");
587}
588
589void JSHTMLMarqueeElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
590{
591 auto* thisObject = jsCast<JSHTMLMarqueeElement*>(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