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 "JSHTMLDivElement.h"
24 #include "HTMLDivElement.h"
25 #include "HTMLNames.h"
27 #include <runtime/JSString.h>
28 #include <wtf/GetPtr.h>
34 ASSERT_CLASS_FITS_IN_CELL(JSHTMLDivElement);
38 #define THUNK_GENERATOR(generator) , generator
40 #define THUNK_GENERATOR(generator)
43 #define INTRINSIC(intrinsic) , intrinsic
45 #define INTRINSIC(intrinsic)
48 static const HashTableValue JSHTMLDivElementTableValues[] =
50 { "align", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLDivElementAlign), (intptr_t)setJSHTMLDivElementAlign THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
51 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLDivElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
52 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
55 #undef THUNK_GENERATOR
56 static const HashTable JSHTMLDivElementTable = { 5, 3, JSHTMLDivElementTableValues, 0 };
57 /* Hash table for constructor */
59 #define THUNK_GENERATOR(generator) , generator
61 #define THUNK_GENERATOR(generator)
64 #define INTRINSIC(intrinsic) , intrinsic
66 #define INTRINSIC(intrinsic)
69 static const HashTableValue JSHTMLDivElementConstructorTableValues[] =
71 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
74 #undef THUNK_GENERATOR
75 static const HashTable JSHTMLDivElementConstructorTable = { 1, 0, JSHTMLDivElementConstructorTableValues, 0 };
76 const ClassInfo JSHTMLDivElementConstructor::s_info = { "HTMLDivElementConstructor", &DOMConstructorObject::s_info, &JSHTMLDivElementConstructorTable, 0, CREATE_METHOD_TABLE(JSHTMLDivElementConstructor) };
78 JSHTMLDivElementConstructor::JSHTMLDivElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
79 : DOMConstructorObject(structure, globalObject)
83 void JSHTMLDivElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
85 Base::finishCreation(exec->globalData());
86 ASSERT(inherits(&s_info));
87 putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLDivElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
90 bool JSHTMLDivElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
92 return getStaticValueSlot<JSHTMLDivElementConstructor, JSDOMWrapper>(exec, &JSHTMLDivElementConstructorTable, static_cast<JSHTMLDivElementConstructor*>(cell), propertyName, slot);
95 bool JSHTMLDivElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
97 return getStaticValueDescriptor<JSHTMLDivElementConstructor, JSDOMWrapper>(exec, &JSHTMLDivElementConstructorTable, static_cast<JSHTMLDivElementConstructor*>(object), propertyName, descriptor);
100 /* Hash table for prototype */
102 #define THUNK_GENERATOR(generator) , generator
104 #define THUNK_GENERATOR(generator)
107 #define INTRINSIC(intrinsic) , intrinsic
109 #define INTRINSIC(intrinsic)
112 static const HashTableValue JSHTMLDivElementPrototypeTableValues[] =
114 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
117 #undef THUNK_GENERATOR
118 static const HashTable JSHTMLDivElementPrototypeTable = { 1, 0, JSHTMLDivElementPrototypeTableValues, 0 };
119 const ClassInfo JSHTMLDivElementPrototype::s_info = { "HTMLDivElementPrototype", &JSC::JSNonFinalObject::s_info, &JSHTMLDivElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSHTMLDivElementPrototype) };
121 JSObject* JSHTMLDivElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
123 return getDOMPrototype<JSHTMLDivElement>(exec, globalObject);
126 const ClassInfo JSHTMLDivElement::s_info = { "HTMLDivElement", &JSHTMLElement::s_info, &JSHTMLDivElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLDivElement) };
128 JSHTMLDivElement::JSHTMLDivElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLDivElement> impl)
129 : JSHTMLElement(structure, globalObject, impl)
133 void JSHTMLDivElement::finishCreation(JSGlobalData& globalData)
135 Base::finishCreation(globalData);
136 ASSERT(inherits(&s_info));
139 JSObject* JSHTMLDivElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
141 return JSHTMLDivElementPrototype::create(exec->globalData(), globalObject, JSHTMLDivElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
144 bool JSHTMLDivElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
146 JSHTMLDivElement* thisObject = jsCast<JSHTMLDivElement*>(cell);
147 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
148 return getStaticValueSlot<JSHTMLDivElement, Base>(exec, &JSHTMLDivElementTable, thisObject, propertyName, slot);
151 bool JSHTMLDivElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
153 JSHTMLDivElement* thisObject = jsCast<JSHTMLDivElement*>(object);
154 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
155 return getStaticValueDescriptor<JSHTMLDivElement, Base>(exec, &JSHTMLDivElementTable, thisObject, propertyName, descriptor);
158 JSValue jsHTMLDivElementAlign(ExecState* exec, JSValue slotBase, const Identifier&)
160 JSHTMLDivElement* castedThis = static_cast<JSHTMLDivElement*>(asObject(slotBase));
162 HTMLDivElement* imp = static_cast<HTMLDivElement*>(castedThis->impl());
163 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alignAttr));
168 JSValue jsHTMLDivElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
170 JSHTMLDivElement* domObject = static_cast<JSHTMLDivElement*>(asObject(slotBase));
171 return JSHTMLDivElement::getConstructor(exec, domObject->globalObject());
174 void JSHTMLDivElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
176 JSHTMLDivElement* thisObject = jsCast<JSHTMLDivElement*>(cell);
177 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
178 lookupPut<JSHTMLDivElement, Base>(exec, propertyName, value, &JSHTMLDivElementTable, thisObject, slot);
181 void setJSHTMLDivElementAlign(ExecState* exec, JSObject* thisObject, JSValue value)
183 JSHTMLDivElement* castedThis = static_cast<JSHTMLDivElement*>(thisObject);
184 HTMLDivElement* imp = static_cast<HTMLDivElement*>(castedThis->impl());
185 imp->setAttribute(WebCore::HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value));
189 JSValue JSHTMLDivElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
191 return getDOMConstructor<JSHTMLDivElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));