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 "JSHTMLTableRowElement.h" |
23 | |
24 | #include "CustomElementReactionQueue.h" |
25 | #include "HTMLNames.h" |
26 | #include "JSDOMAttribute.h" |
27 | #include "JSDOMBinding.h" |
28 | #include "JSDOMConstructorNotConstructable.h" |
29 | #include "JSDOMConvertInterface.h" |
30 | #include "JSDOMConvertNumbers.h" |
31 | #include "JSDOMConvertStrings.h" |
32 | #include "JSDOMExceptionHandling.h" |
33 | #include "JSDOMGlobalObject.h" |
34 | #include "JSDOMOperation.h" |
35 | #include "JSDOMWrapperCache.h" |
36 | #include "JSHTMLCollection.h" |
37 | #include "ScriptExecutionContext.h" |
38 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
39 | #include <JavaScriptCore/JSCInlines.h> |
40 | #include <wtf/GetPtr.h> |
41 | #include <wtf/PointerPreparations.h> |
42 | #include <wtf/URL.h> |
43 | |
44 | |
45 | namespace WebCore { |
46 | using namespace JSC; |
47 | |
48 | // Functions |
49 | |
50 | JSC::EncodedJSValue JSC_HOST_CALL jsHTMLTableRowElementPrototypeFunctionInsertCell(JSC::ExecState*); |
51 | JSC::EncodedJSValue JSC_HOST_CALL jsHTMLTableRowElementPrototypeFunctionDeleteCell(JSC::ExecState*); |
52 | |
53 | // Attributes |
54 | |
55 | JSC::EncodedJSValue jsHTMLTableRowElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
56 | bool setJSHTMLTableRowElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
57 | JSC::EncodedJSValue jsHTMLTableRowElementRowIndex(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
58 | JSC::EncodedJSValue jsHTMLTableRowElementSectionRowIndex(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
59 | JSC::EncodedJSValue jsHTMLTableRowElementCells(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
60 | JSC::EncodedJSValue jsHTMLTableRowElementAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
61 | bool setJSHTMLTableRowElementAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
62 | JSC::EncodedJSValue jsHTMLTableRowElementBgColor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
63 | bool setJSHTMLTableRowElementBgColor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
64 | JSC::EncodedJSValue jsHTMLTableRowElementCh(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
65 | bool setJSHTMLTableRowElementCh(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
66 | JSC::EncodedJSValue jsHTMLTableRowElementChOff(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
67 | bool setJSHTMLTableRowElementChOff(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
68 | JSC::EncodedJSValue jsHTMLTableRowElementVAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
69 | bool setJSHTMLTableRowElementVAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
70 | |
71 | class JSHTMLTableRowElementPrototype : public JSC::JSNonFinalObject { |
72 | public: |
73 | using Base = JSC::JSNonFinalObject; |
74 | static JSHTMLTableRowElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
75 | { |
76 | JSHTMLTableRowElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLTableRowElementPrototype>(vm.heap)) JSHTMLTableRowElementPrototype(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 | JSHTMLTableRowElementPrototype(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 JSHTMLTableRowElementConstructor = JSDOMConstructorNotConstructable<JSHTMLTableRowElement>; |
97 | |
98 | template<> JSValue JSHTMLTableRowElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
99 | { |
100 | return JSHTMLElement::getConstructor(vm, &globalObject); |
101 | } |
102 | |
103 | template<> void JSHTMLTableRowElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
104 | { |
105 | putDirect(vm, vm.propertyNames->prototype, JSHTMLTableRowElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
106 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("HTMLTableRowElement"_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 JSHTMLTableRowElementConstructor::s_info = { "HTMLTableRowElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLTableRowElementConstructor) }; |
111 | |
112 | /* Hash table for prototype */ |
113 | |
114 | static const HashTableValue JSHTMLTableRowElementPrototypeTableValues[] = |
115 | { |
116 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableRowElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableRowElementConstructor) } }, |
117 | { "rowIndex" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableRowElementRowIndex), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
118 | { "sectionRowIndex" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableRowElementSectionRowIndex), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
119 | { "cells" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableRowElementCells), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
120 | { "align" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableRowElementAlign), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableRowElementAlign) } }, |
121 | { "bgColor" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableRowElementBgColor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableRowElementBgColor) } }, |
122 | { "ch" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableRowElementCh), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableRowElementCh) } }, |
123 | { "chOff" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableRowElementChOff), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableRowElementChOff) } }, |
124 | { "vAlign" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableRowElementVAlign), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableRowElementVAlign) } }, |
125 | { "insertCell" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLTableRowElementPrototypeFunctionInsertCell), (intptr_t) (0) } }, |
126 | { "deleteCell" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLTableRowElementPrototypeFunctionDeleteCell), (intptr_t) (1) } }, |
127 | }; |
128 | |
129 | const ClassInfo JSHTMLTableRowElementPrototype::s_info = { "HTMLTableRowElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLTableRowElementPrototype) }; |
130 | |
131 | void JSHTMLTableRowElementPrototype::finishCreation(VM& vm) |
132 | { |
133 | Base::finishCreation(vm); |
134 | reifyStaticProperties(vm, JSHTMLTableRowElement::info(), JSHTMLTableRowElementPrototypeTableValues, *this); |
135 | } |
136 | |
137 | const ClassInfo JSHTMLTableRowElement::s_info = { "HTMLTableRowElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLTableRowElement) }; |
138 | |
139 | JSHTMLTableRowElement::JSHTMLTableRowElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLTableRowElement>&& impl) |
140 | : JSHTMLElement(structure, globalObject, WTFMove(impl)) |
141 | { |
142 | } |
143 | |
144 | void JSHTMLTableRowElement::finishCreation(VM& vm) |
145 | { |
146 | Base::finishCreation(vm); |
147 | ASSERT(inherits(vm, info())); |
148 | |
149 | } |
150 | |
151 | JSObject* JSHTMLTableRowElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
152 | { |
153 | return JSHTMLTableRowElementPrototype::create(vm, &globalObject, JSHTMLTableRowElementPrototype::createStructure(vm, &globalObject, JSHTMLElement::prototype(vm, globalObject))); |
154 | } |
155 | |
156 | JSObject* JSHTMLTableRowElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
157 | { |
158 | return getDOMPrototype<JSHTMLTableRowElement>(vm, globalObject); |
159 | } |
160 | |
161 | JSValue JSHTMLTableRowElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
162 | { |
163 | return getDOMConstructor<JSHTMLTableRowElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
164 | } |
165 | |
166 | template<> inline JSHTMLTableRowElement* IDLAttribute<JSHTMLTableRowElement>::cast(ExecState& state, EncodedJSValue thisValue) |
167 | { |
168 | return jsDynamicCast<JSHTMLTableRowElement*>(state.vm(), JSValue::decode(thisValue)); |
169 | } |
170 | |
171 | template<> inline JSHTMLTableRowElement* IDLOperation<JSHTMLTableRowElement>::cast(ExecState& state) |
172 | { |
173 | return jsDynamicCast<JSHTMLTableRowElement*>(state.vm(), state.thisValue()); |
174 | } |
175 | |
176 | EncodedJSValue jsHTMLTableRowElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
177 | { |
178 | VM& vm = state->vm(); |
179 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
180 | auto* prototype = jsDynamicCast<JSHTMLTableRowElementPrototype*>(vm, JSValue::decode(thisValue)); |
181 | if (UNLIKELY(!prototype)) |
182 | return throwVMTypeError(state, throwScope); |
183 | return JSValue::encode(JSHTMLTableRowElement::getConstructor(state->vm(), prototype->globalObject())); |
184 | } |
185 | |
186 | bool setJSHTMLTableRowElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
187 | { |
188 | VM& vm = state->vm(); |
189 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
190 | auto* prototype = jsDynamicCast<JSHTMLTableRowElementPrototype*>(vm, JSValue::decode(thisValue)); |
191 | if (UNLIKELY(!prototype)) { |
192 | throwVMTypeError(state, throwScope); |
193 | return false; |
194 | } |
195 | // Shadowing a built-in constructor |
196 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
197 | } |
198 | |
199 | static inline JSValue jsHTMLTableRowElementRowIndexGetter(ExecState& state, JSHTMLTableRowElement& thisObject, ThrowScope& throwScope) |
200 | { |
201 | UNUSED_PARAM(throwScope); |
202 | UNUSED_PARAM(state); |
203 | auto& impl = thisObject.wrapped(); |
204 | JSValue result = toJS<IDLLong>(state, throwScope, impl.rowIndex()); |
205 | return result; |
206 | } |
207 | |
208 | EncodedJSValue jsHTMLTableRowElementRowIndex(ExecState* state, EncodedJSValue thisValue, PropertyName) |
209 | { |
210 | return IDLAttribute<JSHTMLTableRowElement>::get<jsHTMLTableRowElementRowIndexGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "rowIndex" ); |
211 | } |
212 | |
213 | static inline JSValue jsHTMLTableRowElementSectionRowIndexGetter(ExecState& state, JSHTMLTableRowElement& thisObject, ThrowScope& throwScope) |
214 | { |
215 | UNUSED_PARAM(throwScope); |
216 | UNUSED_PARAM(state); |
217 | auto& impl = thisObject.wrapped(); |
218 | JSValue result = toJS<IDLLong>(state, throwScope, impl.sectionRowIndex()); |
219 | return result; |
220 | } |
221 | |
222 | EncodedJSValue jsHTMLTableRowElementSectionRowIndex(ExecState* state, EncodedJSValue thisValue, PropertyName) |
223 | { |
224 | return IDLAttribute<JSHTMLTableRowElement>::get<jsHTMLTableRowElementSectionRowIndexGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "sectionRowIndex" ); |
225 | } |
226 | |
227 | static inline JSValue jsHTMLTableRowElementCellsGetter(ExecState& state, JSHTMLTableRowElement& thisObject, ThrowScope& throwScope) |
228 | { |
229 | UNUSED_PARAM(throwScope); |
230 | UNUSED_PARAM(state); |
231 | auto& impl = thisObject.wrapped(); |
232 | JSValue result = toJS<IDLInterface<HTMLCollection>>(state, *thisObject.globalObject(), throwScope, impl.cells()); |
233 | return result; |
234 | } |
235 | |
236 | EncodedJSValue jsHTMLTableRowElementCells(ExecState* state, EncodedJSValue thisValue, PropertyName) |
237 | { |
238 | return IDLAttribute<JSHTMLTableRowElement>::get<jsHTMLTableRowElementCellsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "cells" ); |
239 | } |
240 | |
241 | static inline JSValue jsHTMLTableRowElementAlignGetter(ExecState& state, JSHTMLTableRowElement& 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::alignAttr)); |
247 | return result; |
248 | } |
249 | |
250 | EncodedJSValue jsHTMLTableRowElementAlign(ExecState* state, EncodedJSValue thisValue, PropertyName) |
251 | { |
252 | return IDLAttribute<JSHTMLTableRowElement>::get<jsHTMLTableRowElementAlignGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "align" ); |
253 | } |
254 | |
255 | static inline bool setJSHTMLTableRowElementAlignSetter(ExecState& state, JSHTMLTableRowElement& 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::alignAttr, WTFMove(nativeValue)); |
264 | }); |
265 | return true; |
266 | } |
267 | |
268 | bool setJSHTMLTableRowElementAlign(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
269 | { |
270 | return IDLAttribute<JSHTMLTableRowElement>::set<setJSHTMLTableRowElementAlignSetter>(*state, thisValue, encodedValue, "align" ); |
271 | } |
272 | |
273 | static inline JSValue jsHTMLTableRowElementBgColorGetter(ExecState& state, JSHTMLTableRowElement& thisObject, ThrowScope& throwScope) |
274 | { |
275 | UNUSED_PARAM(throwScope); |
276 | UNUSED_PARAM(state); |
277 | auto& impl = thisObject.wrapped(); |
278 | JSValue result = toJS<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::bgcolorAttr)); |
279 | return result; |
280 | } |
281 | |
282 | EncodedJSValue jsHTMLTableRowElementBgColor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
283 | { |
284 | return IDLAttribute<JSHTMLTableRowElement>::get<jsHTMLTableRowElementBgColorGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "bgColor" ); |
285 | } |
286 | |
287 | static inline bool setJSHTMLTableRowElementBgColorSetter(ExecState& state, JSHTMLTableRowElement& thisObject, JSValue value, ThrowScope& throwScope) |
288 | { |
289 | UNUSED_PARAM(throwScope); |
290 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
291 | auto& impl = thisObject.wrapped(); |
292 | auto nativeValue = convert<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, value); |
293 | RETURN_IF_EXCEPTION(throwScope, false); |
294 | AttributeSetter::call(state, throwScope, [&] { |
295 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::bgcolorAttr, WTFMove(nativeValue)); |
296 | }); |
297 | return true; |
298 | } |
299 | |
300 | bool setJSHTMLTableRowElementBgColor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
301 | { |
302 | return IDLAttribute<JSHTMLTableRowElement>::set<setJSHTMLTableRowElementBgColorSetter>(*state, thisValue, encodedValue, "bgColor" ); |
303 | } |
304 | |
305 | static inline JSValue jsHTMLTableRowElementChGetter(ExecState& state, JSHTMLTableRowElement& 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::charAttr)); |
311 | return result; |
312 | } |
313 | |
314 | EncodedJSValue jsHTMLTableRowElementCh(ExecState* state, EncodedJSValue thisValue, PropertyName) |
315 | { |
316 | return IDLAttribute<JSHTMLTableRowElement>::get<jsHTMLTableRowElementChGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "ch" ); |
317 | } |
318 | |
319 | static inline bool setJSHTMLTableRowElementChSetter(ExecState& state, JSHTMLTableRowElement& 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::charAttr, WTFMove(nativeValue)); |
328 | }); |
329 | return true; |
330 | } |
331 | |
332 | bool setJSHTMLTableRowElementCh(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
333 | { |
334 | return IDLAttribute<JSHTMLTableRowElement>::set<setJSHTMLTableRowElementChSetter>(*state, thisValue, encodedValue, "ch" ); |
335 | } |
336 | |
337 | static inline JSValue jsHTMLTableRowElementChOffGetter(ExecState& state, JSHTMLTableRowElement& thisObject, ThrowScope& throwScope) |
338 | { |
339 | UNUSED_PARAM(throwScope); |
340 | UNUSED_PARAM(state); |
341 | auto& impl = thisObject.wrapped(); |
342 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::charoffAttr)); |
343 | return result; |
344 | } |
345 | |
346 | EncodedJSValue jsHTMLTableRowElementChOff(ExecState* state, EncodedJSValue thisValue, PropertyName) |
347 | { |
348 | return IDLAttribute<JSHTMLTableRowElement>::get<jsHTMLTableRowElementChOffGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "chOff" ); |
349 | } |
350 | |
351 | static inline bool setJSHTMLTableRowElementChOffSetter(ExecState& state, JSHTMLTableRowElement& thisObject, JSValue value, ThrowScope& throwScope) |
352 | { |
353 | UNUSED_PARAM(throwScope); |
354 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
355 | auto& impl = thisObject.wrapped(); |
356 | auto nativeValue = convert<IDLDOMString>(state, value); |
357 | RETURN_IF_EXCEPTION(throwScope, false); |
358 | AttributeSetter::call(state, throwScope, [&] { |
359 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::charoffAttr, WTFMove(nativeValue)); |
360 | }); |
361 | return true; |
362 | } |
363 | |
364 | bool setJSHTMLTableRowElementChOff(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
365 | { |
366 | return IDLAttribute<JSHTMLTableRowElement>::set<setJSHTMLTableRowElementChOffSetter>(*state, thisValue, encodedValue, "chOff" ); |
367 | } |
368 | |
369 | static inline JSValue jsHTMLTableRowElementVAlignGetter(ExecState& state, JSHTMLTableRowElement& thisObject, ThrowScope& throwScope) |
370 | { |
371 | UNUSED_PARAM(throwScope); |
372 | UNUSED_PARAM(state); |
373 | auto& impl = thisObject.wrapped(); |
374 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::valignAttr)); |
375 | return result; |
376 | } |
377 | |
378 | EncodedJSValue jsHTMLTableRowElementVAlign(ExecState* state, EncodedJSValue thisValue, PropertyName) |
379 | { |
380 | return IDLAttribute<JSHTMLTableRowElement>::get<jsHTMLTableRowElementVAlignGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "vAlign" ); |
381 | } |
382 | |
383 | static inline bool setJSHTMLTableRowElementVAlignSetter(ExecState& state, JSHTMLTableRowElement& thisObject, JSValue value, ThrowScope& throwScope) |
384 | { |
385 | UNUSED_PARAM(throwScope); |
386 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
387 | auto& impl = thisObject.wrapped(); |
388 | auto nativeValue = convert<IDLDOMString>(state, value); |
389 | RETURN_IF_EXCEPTION(throwScope, false); |
390 | AttributeSetter::call(state, throwScope, [&] { |
391 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::valignAttr, WTFMove(nativeValue)); |
392 | }); |
393 | return true; |
394 | } |
395 | |
396 | bool setJSHTMLTableRowElementVAlign(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
397 | { |
398 | return IDLAttribute<JSHTMLTableRowElement>::set<setJSHTMLTableRowElementVAlignSetter>(*state, thisValue, encodedValue, "vAlign" ); |
399 | } |
400 | |
401 | static inline JSC::EncodedJSValue jsHTMLTableRowElementPrototypeFunctionInsertCellBody(JSC::ExecState* state, typename IDLOperation<JSHTMLTableRowElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
402 | { |
403 | UNUSED_PARAM(state); |
404 | UNUSED_PARAM(throwScope); |
405 | auto& impl = castedThis->wrapped(); |
406 | auto index = state->argument(0).isUndefined() ? -1 : convert<IDLLong>(*state, state->uncheckedArgument(0)); |
407 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
408 | return JSValue::encode(toJS<IDLInterface<HTMLElement>>(*state, *castedThis->globalObject(), throwScope, impl.insertCell(WTFMove(index)))); |
409 | } |
410 | |
411 | EncodedJSValue JSC_HOST_CALL jsHTMLTableRowElementPrototypeFunctionInsertCell(ExecState* state) |
412 | { |
413 | return IDLOperation<JSHTMLTableRowElement>::call<jsHTMLTableRowElementPrototypeFunctionInsertCellBody>(*state, "insertCell" ); |
414 | } |
415 | |
416 | static inline JSC::EncodedJSValue jsHTMLTableRowElementPrototypeFunctionDeleteCellBody(JSC::ExecState* state, typename IDLOperation<JSHTMLTableRowElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
417 | { |
418 | UNUSED_PARAM(state); |
419 | UNUSED_PARAM(throwScope); |
420 | CustomElementReactionStack customElementReactionStack(*state); |
421 | auto& impl = castedThis->wrapped(); |
422 | if (UNLIKELY(state->argumentCount() < 1)) |
423 | return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
424 | auto index = convert<IDLLong>(*state, state->uncheckedArgument(0)); |
425 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
426 | propagateException(*state, throwScope, impl.deleteCell(WTFMove(index))); |
427 | return JSValue::encode(jsUndefined()); |
428 | } |
429 | |
430 | EncodedJSValue JSC_HOST_CALL jsHTMLTableRowElementPrototypeFunctionDeleteCell(ExecState* state) |
431 | { |
432 | return IDLOperation<JSHTMLTableRowElement>::call<jsHTMLTableRowElementPrototypeFunctionDeleteCellBody>(*state, "deleteCell" ); |
433 | } |
434 | |
435 | void JSHTMLTableRowElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
436 | { |
437 | auto* thisObject = jsCast<JSHTMLTableRowElement*>(cell); |
438 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
439 | if (thisObject->scriptExecutionContext()) |
440 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
441 | Base::heapSnapshot(cell, builder); |
442 | } |
443 | |
444 | |
445 | } |
446 | |