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 "JSHTMLBaseElement.h"
24 #include "HTMLBaseElement.h"
25 #include "HTMLNames.h"
27 #include <runtime/JSString.h>
28 #include <wtf/GetPtr.h>
34 ASSERT_CLASS_FITS_IN_CELL(JSHTMLBaseElement);
38 #define THUNK_GENERATOR(generator) , generator
40 #define THUNK_GENERATOR(generator)
43 #define INTRINSIC(intrinsic) , intrinsic
45 #define INTRINSIC(intrinsic)
48 static const HashTableValue JSHTMLBaseElementTableValues[] =
50 { "href", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBaseElementHref), (intptr_t)setJSHTMLBaseElementHref THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
51 { "target", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBaseElementTarget), (intptr_t)setJSHTMLBaseElementTarget THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
52 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBaseElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
56 #undef THUNK_GENERATOR
57 static const HashTable JSHTMLBaseElementTable = { 8, 7, JSHTMLBaseElementTableValues, 0 };
58 /* Hash table for constructor */
60 #define THUNK_GENERATOR(generator) , generator
62 #define THUNK_GENERATOR(generator)
65 #define INTRINSIC(intrinsic) , intrinsic
67 #define INTRINSIC(intrinsic)
70 static const HashTableValue JSHTMLBaseElementConstructorTableValues[] =
72 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
75 #undef THUNK_GENERATOR
76 static const HashTable JSHTMLBaseElementConstructorTable = { 1, 0, JSHTMLBaseElementConstructorTableValues, 0 };
77 const ClassInfo JSHTMLBaseElementConstructor::s_info = { "HTMLBaseElementConstructor", &DOMConstructorObject::s_info, &JSHTMLBaseElementConstructorTable, 0, CREATE_METHOD_TABLE(JSHTMLBaseElementConstructor) };
79 JSHTMLBaseElementConstructor::JSHTMLBaseElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
80 : DOMConstructorObject(structure, globalObject)
84 void JSHTMLBaseElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
86 Base::finishCreation(exec->globalData());
87 ASSERT(inherits(&s_info));
88 putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLBaseElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
91 bool JSHTMLBaseElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
93 return getStaticValueSlot<JSHTMLBaseElementConstructor, JSDOMWrapper>(exec, &JSHTMLBaseElementConstructorTable, static_cast<JSHTMLBaseElementConstructor*>(cell), propertyName, slot);
96 bool JSHTMLBaseElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
98 return getStaticValueDescriptor<JSHTMLBaseElementConstructor, JSDOMWrapper>(exec, &JSHTMLBaseElementConstructorTable, static_cast<JSHTMLBaseElementConstructor*>(object), propertyName, descriptor);
101 /* Hash table for prototype */
103 #define THUNK_GENERATOR(generator) , generator
105 #define THUNK_GENERATOR(generator)
108 #define INTRINSIC(intrinsic) , intrinsic
110 #define INTRINSIC(intrinsic)
113 static const HashTableValue JSHTMLBaseElementPrototypeTableValues[] =
115 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
118 #undef THUNK_GENERATOR
119 static const HashTable JSHTMLBaseElementPrototypeTable = { 1, 0, JSHTMLBaseElementPrototypeTableValues, 0 };
120 const ClassInfo JSHTMLBaseElementPrototype::s_info = { "HTMLBaseElementPrototype", &JSC::JSNonFinalObject::s_info, &JSHTMLBaseElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSHTMLBaseElementPrototype) };
122 JSObject* JSHTMLBaseElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
124 return getDOMPrototype<JSHTMLBaseElement>(exec, globalObject);
127 const ClassInfo JSHTMLBaseElement::s_info = { "HTMLBaseElement", &JSHTMLElement::s_info, &JSHTMLBaseElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLBaseElement) };
129 JSHTMLBaseElement::JSHTMLBaseElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLBaseElement> impl)
130 : JSHTMLElement(structure, globalObject, impl)
134 void JSHTMLBaseElement::finishCreation(JSGlobalData& globalData)
136 Base::finishCreation(globalData);
137 ASSERT(inherits(&s_info));
140 JSObject* JSHTMLBaseElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
142 return JSHTMLBaseElementPrototype::create(exec->globalData(), globalObject, JSHTMLBaseElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
145 bool JSHTMLBaseElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
147 JSHTMLBaseElement* thisObject = jsCast<JSHTMLBaseElement*>(cell);
148 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
149 return getStaticValueSlot<JSHTMLBaseElement, Base>(exec, &JSHTMLBaseElementTable, thisObject, propertyName, slot);
152 bool JSHTMLBaseElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
154 JSHTMLBaseElement* thisObject = jsCast<JSHTMLBaseElement*>(object);
155 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
156 return getStaticValueDescriptor<JSHTMLBaseElement, Base>(exec, &JSHTMLBaseElementTable, thisObject, propertyName, descriptor);
159 JSValue jsHTMLBaseElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
161 JSHTMLBaseElement* castedThis = static_cast<JSHTMLBaseElement*>(asObject(slotBase));
163 HTMLBaseElement* imp = static_cast<HTMLBaseElement*>(castedThis->impl());
164 JSValue result = jsString(exec, imp->getURLAttribute(WebCore::HTMLNames::hrefAttr));
169 JSValue jsHTMLBaseElementTarget(ExecState* exec, JSValue slotBase, const Identifier&)
171 JSHTMLBaseElement* castedThis = static_cast<JSHTMLBaseElement*>(asObject(slotBase));
173 HTMLBaseElement* imp = static_cast<HTMLBaseElement*>(castedThis->impl());
174 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::targetAttr));
179 JSValue jsHTMLBaseElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
181 JSHTMLBaseElement* domObject = static_cast<JSHTMLBaseElement*>(asObject(slotBase));
182 return JSHTMLBaseElement::getConstructor(exec, domObject->globalObject());
185 void JSHTMLBaseElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
187 JSHTMLBaseElement* thisObject = jsCast<JSHTMLBaseElement*>(cell);
188 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
189 lookupPut<JSHTMLBaseElement, Base>(exec, propertyName, value, &JSHTMLBaseElementTable, thisObject, slot);
192 void setJSHTMLBaseElementHref(ExecState* exec, JSObject* thisObject, JSValue value)
194 JSHTMLBaseElement* castedThis = static_cast<JSHTMLBaseElement*>(thisObject);
195 HTMLBaseElement* imp = static_cast<HTMLBaseElement*>(castedThis->impl());
196 imp->setAttribute(WebCore::HTMLNames::hrefAttr, valueToStringWithNullCheck(exec, value));
200 void setJSHTMLBaseElementTarget(ExecState* exec, JSObject* thisObject, JSValue value)
202 JSHTMLBaseElement* castedThis = static_cast<JSHTMLBaseElement*>(thisObject);
203 HTMLBaseElement* imp = static_cast<HTMLBaseElement*>(castedThis->impl());
204 imp->setAttribute(WebCore::HTMLNames::targetAttr, valueToStringWithNullCheck(exec, value));
208 JSValue JSHTMLBaseElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
210 return getDOMConstructor<JSHTMLBaseElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));