2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
22 #include "JSHTMLTableSectionElement.h"
24 #include "ExceptionCode.h"
25 #include "HTMLCollection.h"
26 #include "HTMLElement.h"
27 #include "HTMLNames.h"
28 #include "HTMLTableSectionElement.h"
29 #include "JSDOMBinding.h"
30 #include "JSHTMLCollection.h"
31 #include "JSHTMLElement.h"
33 #include <runtime/Error.h>
34 #include <runtime/JSString.h>
35 #include <wtf/GetPtr.h>
41 ASSERT_CLASS_FITS_IN_CELL(JSHTMLTableSectionElement);
45 #define THUNK_GENERATOR(generator) , generator
47 #define THUNK_GENERATOR(generator)
50 #define INTRINSIC(intrinsic) , intrinsic
52 #define INTRINSIC(intrinsic)
55 static const HashTableValue JSHTMLTableSectionElementTableValues[] =
57 { "align", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableSectionElementAlign), (intptr_t)setJSHTMLTableSectionElementAlign THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
58 { "ch", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableSectionElementCh), (intptr_t)setJSHTMLTableSectionElementCh THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
59 { "chOff", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableSectionElementChOff), (intptr_t)setJSHTMLTableSectionElementChOff THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
60 { "vAlign", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableSectionElementVAlign), (intptr_t)setJSHTMLTableSectionElementVAlign THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
61 { "rows", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableSectionElementRows), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
62 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableSectionElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
63 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
66 #undef THUNK_GENERATOR
67 static const HashTable JSHTMLTableSectionElementTable = { 16, 15, JSHTMLTableSectionElementTableValues, 0 };
68 /* Hash table for constructor */
70 #define THUNK_GENERATOR(generator) , generator
72 #define THUNK_GENERATOR(generator)
75 #define INTRINSIC(intrinsic) , intrinsic
77 #define INTRINSIC(intrinsic)
80 static const HashTableValue JSHTMLTableSectionElementConstructorTableValues[] =
82 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
85 #undef THUNK_GENERATOR
86 static const HashTable JSHTMLTableSectionElementConstructorTable = { 1, 0, JSHTMLTableSectionElementConstructorTableValues, 0 };
87 const ClassInfo JSHTMLTableSectionElementConstructor::s_info = { "HTMLTableSectionElementConstructor", &DOMConstructorObject::s_info, &JSHTMLTableSectionElementConstructorTable, 0, CREATE_METHOD_TABLE(JSHTMLTableSectionElementConstructor) };
89 JSHTMLTableSectionElementConstructor::JSHTMLTableSectionElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
90 : DOMConstructorObject(structure, globalObject)
94 void JSHTMLTableSectionElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
96 Base::finishCreation(exec->globalData());
97 ASSERT(inherits(&s_info));
98 putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLTableSectionElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
101 bool JSHTMLTableSectionElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
103 return getStaticValueSlot<JSHTMLTableSectionElementConstructor, JSDOMWrapper>(exec, &JSHTMLTableSectionElementConstructorTable, static_cast<JSHTMLTableSectionElementConstructor*>(cell), propertyName, slot);
106 bool JSHTMLTableSectionElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
108 return getStaticValueDescriptor<JSHTMLTableSectionElementConstructor, JSDOMWrapper>(exec, &JSHTMLTableSectionElementConstructorTable, static_cast<JSHTMLTableSectionElementConstructor*>(object), propertyName, descriptor);
111 /* Hash table for prototype */
113 #define THUNK_GENERATOR(generator) , generator
115 #define THUNK_GENERATOR(generator)
118 #define INTRINSIC(intrinsic) , intrinsic
120 #define INTRINSIC(intrinsic)
123 static const HashTableValue JSHTMLTableSectionElementPrototypeTableValues[] =
125 { "insertRow", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsHTMLTableSectionElementPrototypeFunctionInsertRow), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
126 { "deleteRow", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsHTMLTableSectionElementPrototypeFunctionDeleteRow), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
127 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
130 #undef THUNK_GENERATOR
131 static const HashTable JSHTMLTableSectionElementPrototypeTable = { 5, 3, JSHTMLTableSectionElementPrototypeTableValues, 0 };
132 const ClassInfo JSHTMLTableSectionElementPrototype::s_info = { "HTMLTableSectionElementPrototype", &JSC::JSNonFinalObject::s_info, &JSHTMLTableSectionElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSHTMLTableSectionElementPrototype) };
134 JSObject* JSHTMLTableSectionElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
136 return getDOMPrototype<JSHTMLTableSectionElement>(exec, globalObject);
139 bool JSHTMLTableSectionElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
141 JSHTMLTableSectionElementPrototype* thisObject = jsCast<JSHTMLTableSectionElementPrototype*>(cell);
142 return getStaticFunctionSlot<JSObject>(exec, &JSHTMLTableSectionElementPrototypeTable, thisObject, propertyName, slot);
145 bool JSHTMLTableSectionElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
147 JSHTMLTableSectionElementPrototype* thisObject = jsCast<JSHTMLTableSectionElementPrototype*>(object);
148 return getStaticFunctionDescriptor<JSObject>(exec, &JSHTMLTableSectionElementPrototypeTable, thisObject, propertyName, descriptor);
151 const ClassInfo JSHTMLTableSectionElement::s_info = { "HTMLTableSectionElement", &JSHTMLElement::s_info, &JSHTMLTableSectionElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLTableSectionElement) };
153 JSHTMLTableSectionElement::JSHTMLTableSectionElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTableSectionElement> impl)
154 : JSHTMLElement(structure, globalObject, impl)
158 void JSHTMLTableSectionElement::finishCreation(JSGlobalData& globalData)
160 Base::finishCreation(globalData);
161 ASSERT(inherits(&s_info));
164 JSObject* JSHTMLTableSectionElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
166 return JSHTMLTableSectionElementPrototype::create(exec->globalData(), globalObject, JSHTMLTableSectionElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
169 bool JSHTMLTableSectionElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
171 JSHTMLTableSectionElement* thisObject = jsCast<JSHTMLTableSectionElement*>(cell);
172 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
173 return getStaticValueSlot<JSHTMLTableSectionElement, Base>(exec, &JSHTMLTableSectionElementTable, thisObject, propertyName, slot);
176 bool JSHTMLTableSectionElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
178 JSHTMLTableSectionElement* thisObject = jsCast<JSHTMLTableSectionElement*>(object);
179 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
180 return getStaticValueDescriptor<JSHTMLTableSectionElement, Base>(exec, &JSHTMLTableSectionElementTable, thisObject, propertyName, descriptor);
183 JSValue jsHTMLTableSectionElementAlign(ExecState* exec, JSValue slotBase, const Identifier&)
185 JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slotBase));
187 HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
188 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alignAttr));
193 JSValue jsHTMLTableSectionElementCh(ExecState* exec, JSValue slotBase, const Identifier&)
195 JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slotBase));
197 HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
198 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::charAttr));
203 JSValue jsHTMLTableSectionElementChOff(ExecState* exec, JSValue slotBase, const Identifier&)
205 JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slotBase));
207 HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
208 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::charoffAttr));
213 JSValue jsHTMLTableSectionElementVAlign(ExecState* exec, JSValue slotBase, const Identifier&)
215 JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slotBase));
217 HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
218 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::valignAttr));
223 JSValue jsHTMLTableSectionElementRows(ExecState* exec, JSValue slotBase, const Identifier&)
225 JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slotBase));
227 HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
228 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->rows()));
233 JSValue jsHTMLTableSectionElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
235 JSHTMLTableSectionElement* domObject = static_cast<JSHTMLTableSectionElement*>(asObject(slotBase));
236 return JSHTMLTableSectionElement::getConstructor(exec, domObject->globalObject());
239 void JSHTMLTableSectionElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
241 JSHTMLTableSectionElement* thisObject = jsCast<JSHTMLTableSectionElement*>(cell);
242 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
243 lookupPut<JSHTMLTableSectionElement, Base>(exec, propertyName, value, &JSHTMLTableSectionElementTable, thisObject, slot);
246 void setJSHTMLTableSectionElementAlign(ExecState* exec, JSObject* thisObject, JSValue value)
248 JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(thisObject);
249 HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
250 imp->setAttribute(WebCore::HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value));
254 void setJSHTMLTableSectionElementCh(ExecState* exec, JSObject* thisObject, JSValue value)
256 JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(thisObject);
257 HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
258 imp->setAttribute(WebCore::HTMLNames::charAttr, valueToStringWithNullCheck(exec, value));
262 void setJSHTMLTableSectionElementChOff(ExecState* exec, JSObject* thisObject, JSValue value)
264 JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(thisObject);
265 HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
266 imp->setAttribute(WebCore::HTMLNames::charoffAttr, valueToStringWithNullCheck(exec, value));
270 void setJSHTMLTableSectionElementVAlign(ExecState* exec, JSObject* thisObject, JSValue value)
272 JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(thisObject);
273 HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
274 imp->setAttribute(WebCore::HTMLNames::valignAttr, valueToStringWithNullCheck(exec, value));
278 JSValue JSHTMLTableSectionElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
280 return getDOMConstructor<JSHTMLTableSectionElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
283 EncodedJSValue JSC_HOST_CALL jsHTMLTableSectionElementPrototypeFunctionInsertRow(ExecState* exec)
285 JSValue thisValue = exec->hostThisValue();
286 if (!thisValue.inherits(&JSHTMLTableSectionElement::s_info))
287 return throwVMTypeError(exec);
288 JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(thisValue));
289 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSHTMLTableSectionElement::s_info);
290 HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
291 ExceptionCode ec = 0;
292 int index(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
293 if (exec->hadException())
294 return JSValue::encode(jsUndefined());
296 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->insertRow(index, ec)));
297 setDOMException(exec, ec);
298 return JSValue::encode(result);
301 EncodedJSValue JSC_HOST_CALL jsHTMLTableSectionElementPrototypeFunctionDeleteRow(ExecState* exec)
303 JSValue thisValue = exec->hostThisValue();
304 if (!thisValue.inherits(&JSHTMLTableSectionElement::s_info))
305 return throwVMTypeError(exec);
306 JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(thisValue));
307 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSHTMLTableSectionElement::s_info);
308 HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
309 ExceptionCode ec = 0;
310 int index(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
311 if (exec->hadException())
312 return JSValue::encode(jsUndefined());
313 imp->deleteRow(index, ec);
314 setDOMException(exec, ec);
315 return JSValue::encode(jsUndefined());
318 HTMLTableSectionElement* toHTMLTableSectionElement(JSC::JSValue value)
320 return value.inherits(&JSHTMLTableSectionElement::s_info) ? static_cast<JSHTMLTableSectionElement*>(asObject(value))->impl() : 0;