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 "JSHTMLLegendElement.h"
24 #include "HTMLFormElement.h"
25 #include "HTMLLegendElement.h"
26 #include "HTMLNames.h"
27 #include "JSHTMLFormElement.h"
29 #include <runtime/JSString.h>
30 #include <wtf/GetPtr.h>
36 ASSERT_CLASS_FITS_IN_CELL(JSHTMLLegendElement);
40 #define THUNK_GENERATOR(generator) , generator
42 #define THUNK_GENERATOR(generator)
45 #define INTRINSIC(intrinsic) , intrinsic
47 #define INTRINSIC(intrinsic)
50 static const HashTableValue JSHTMLLegendElementTableValues[] =
52 { "form", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLegendElementForm), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53 { "align", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLegendElementAlign), (intptr_t)setJSHTMLLegendElementAlign THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
54 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLegendElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
55 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
58 #undef THUNK_GENERATOR
59 static const HashTable JSHTMLLegendElementTable = { 9, 7, JSHTMLLegendElementTableValues, 0 };
60 /* Hash table for constructor */
62 #define THUNK_GENERATOR(generator) , generator
64 #define THUNK_GENERATOR(generator)
67 #define INTRINSIC(intrinsic) , intrinsic
69 #define INTRINSIC(intrinsic)
72 static const HashTableValue JSHTMLLegendElementConstructorTableValues[] =
74 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
77 #undef THUNK_GENERATOR
78 static const HashTable JSHTMLLegendElementConstructorTable = { 1, 0, JSHTMLLegendElementConstructorTableValues, 0 };
79 const ClassInfo JSHTMLLegendElementConstructor::s_info = { "HTMLLegendElementConstructor", &DOMConstructorObject::s_info, &JSHTMLLegendElementConstructorTable, 0, CREATE_METHOD_TABLE(JSHTMLLegendElementConstructor) };
81 JSHTMLLegendElementConstructor::JSHTMLLegendElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
82 : DOMConstructorObject(structure, globalObject)
86 void JSHTMLLegendElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
88 Base::finishCreation(exec->globalData());
89 ASSERT(inherits(&s_info));
90 putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLLegendElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
93 bool JSHTMLLegendElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
95 return getStaticValueSlot<JSHTMLLegendElementConstructor, JSDOMWrapper>(exec, &JSHTMLLegendElementConstructorTable, static_cast<JSHTMLLegendElementConstructor*>(cell), propertyName, slot);
98 bool JSHTMLLegendElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
100 return getStaticValueDescriptor<JSHTMLLegendElementConstructor, JSDOMWrapper>(exec, &JSHTMLLegendElementConstructorTable, static_cast<JSHTMLLegendElementConstructor*>(object), propertyName, descriptor);
103 /* Hash table for prototype */
105 #define THUNK_GENERATOR(generator) , generator
107 #define THUNK_GENERATOR(generator)
110 #define INTRINSIC(intrinsic) , intrinsic
112 #define INTRINSIC(intrinsic)
115 static const HashTableValue JSHTMLLegendElementPrototypeTableValues[] =
117 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
120 #undef THUNK_GENERATOR
121 static const HashTable JSHTMLLegendElementPrototypeTable = { 1, 0, JSHTMLLegendElementPrototypeTableValues, 0 };
122 const ClassInfo JSHTMLLegendElementPrototype::s_info = { "HTMLLegendElementPrototype", &JSC::JSNonFinalObject::s_info, &JSHTMLLegendElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSHTMLLegendElementPrototype) };
124 JSObject* JSHTMLLegendElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
126 return getDOMPrototype<JSHTMLLegendElement>(exec, globalObject);
129 const ClassInfo JSHTMLLegendElement::s_info = { "HTMLLegendElement", &JSHTMLElement::s_info, &JSHTMLLegendElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLLegendElement) };
131 JSHTMLLegendElement::JSHTMLLegendElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLLegendElement> impl)
132 : JSHTMLElement(structure, globalObject, impl)
136 void JSHTMLLegendElement::finishCreation(JSGlobalData& globalData)
138 Base::finishCreation(globalData);
139 ASSERT(inherits(&s_info));
142 JSObject* JSHTMLLegendElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
144 return JSHTMLLegendElementPrototype::create(exec->globalData(), globalObject, JSHTMLLegendElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
147 bool JSHTMLLegendElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
149 JSHTMLLegendElement* thisObject = jsCast<JSHTMLLegendElement*>(cell);
150 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
151 return getStaticValueSlot<JSHTMLLegendElement, Base>(exec, &JSHTMLLegendElementTable, thisObject, propertyName, slot);
154 bool JSHTMLLegendElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
156 JSHTMLLegendElement* thisObject = jsCast<JSHTMLLegendElement*>(object);
157 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
158 return getStaticValueDescriptor<JSHTMLLegendElement, Base>(exec, &JSHTMLLegendElementTable, thisObject, propertyName, descriptor);
161 JSValue jsHTMLLegendElementForm(ExecState* exec, JSValue slotBase, const Identifier&)
163 JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(asObject(slotBase));
165 HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl());
166 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form()));
171 JSValue jsHTMLLegendElementAlign(ExecState* exec, JSValue slotBase, const Identifier&)
173 JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(asObject(slotBase));
175 HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl());
176 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alignAttr));
181 JSValue jsHTMLLegendElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
183 JSHTMLLegendElement* domObject = static_cast<JSHTMLLegendElement*>(asObject(slotBase));
184 return JSHTMLLegendElement::getConstructor(exec, domObject->globalObject());
187 void JSHTMLLegendElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
189 JSHTMLLegendElement* thisObject = jsCast<JSHTMLLegendElement*>(cell);
190 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
191 lookupPut<JSHTMLLegendElement, Base>(exec, propertyName, value, &JSHTMLLegendElementTable, thisObject, slot);
194 void setJSHTMLLegendElementAlign(ExecState* exec, JSObject* thisObject, JSValue value)
196 JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(thisObject);
197 HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl());
198 imp->setAttribute(WebCore::HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value));
202 JSValue JSHTMLLegendElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
204 return getDOMConstructor<JSHTMLLegendElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));