|
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 "JSHTMLLegendElement.h" |
|
23 |
|
24 #include "HTMLFormElement.h" |
|
25 #include "HTMLLegendElement.h" |
|
26 #include "HTMLNames.h" |
|
27 #include "JSHTMLFormElement.h" |
|
28 #include "KURL.h" |
|
29 #include <runtime/JSString.h> |
|
30 #include <wtf/GetPtr.h> |
|
31 |
|
32 using namespace JSC; |
|
33 |
|
34 namespace WebCore { |
|
35 |
|
36 ASSERT_CLASS_FITS_IN_CELL(JSHTMLLegendElement); |
|
37 |
|
38 /* Hash table */ |
|
39 #if ENABLE(JIT) |
|
40 #define THUNK_GENERATOR(generator) , generator |
|
41 #else |
|
42 #define THUNK_GENERATOR(generator) |
|
43 #endif |
|
44 |
|
45 static const HashTableValue JSHTMLLegendElementTableValues[5] = |
|
46 { |
|
47 { "form", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLegendElementForm), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
48 { "accessKey", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLegendElementAccessKey), (intptr_t)setJSHTMLLegendElementAccessKey THUNK_GENERATOR(0) }, |
|
49 { "align", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLegendElementAlign), (intptr_t)setJSHTMLLegendElementAlign THUNK_GENERATOR(0) }, |
|
50 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLegendElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
51 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
52 }; |
|
53 |
|
54 #undef THUNK_GENERATOR |
|
55 static JSC_CONST_HASHTABLE HashTable JSHTMLLegendElementTable = { 9, 7, JSHTMLLegendElementTableValues, 0 }; |
|
56 /* Hash table for constructor */ |
|
57 #if ENABLE(JIT) |
|
58 #define THUNK_GENERATOR(generator) , generator |
|
59 #else |
|
60 #define THUNK_GENERATOR(generator) |
|
61 #endif |
|
62 |
|
63 static const HashTableValue JSHTMLLegendElementConstructorTableValues[1] = |
|
64 { |
|
65 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
66 }; |
|
67 |
|
68 #undef THUNK_GENERATOR |
|
69 static JSC_CONST_HASHTABLE HashTable JSHTMLLegendElementConstructorTable = { 1, 0, JSHTMLLegendElementConstructorTableValues, 0 }; |
|
70 class JSHTMLLegendElementConstructor : public DOMConstructorObject { |
|
71 public: |
|
72 JSHTMLLegendElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
73 |
|
74 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
75 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
76 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
77 static const JSC::ClassInfo s_info; |
|
78 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
79 { |
|
80 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
81 } |
|
82 protected: |
|
83 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
84 }; |
|
85 |
|
86 const ClassInfo JSHTMLLegendElementConstructor::s_info = { "HTMLLegendElementConstructor", 0, &JSHTMLLegendElementConstructorTable, 0 }; |
|
87 |
|
88 JSHTMLLegendElementConstructor::JSHTMLLegendElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
89 : DOMConstructorObject(JSHTMLLegendElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
90 { |
|
91 putDirect(exec->propertyNames().prototype, JSHTMLLegendElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
92 } |
|
93 |
|
94 bool JSHTMLLegendElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
95 { |
|
96 return getStaticValueSlot<JSHTMLLegendElementConstructor, DOMObject>(exec, &JSHTMLLegendElementConstructorTable, this, propertyName, slot); |
|
97 } |
|
98 |
|
99 bool JSHTMLLegendElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
100 { |
|
101 return getStaticValueDescriptor<JSHTMLLegendElementConstructor, DOMObject>(exec, &JSHTMLLegendElementConstructorTable, this, propertyName, descriptor); |
|
102 } |
|
103 |
|
104 /* Hash table for prototype */ |
|
105 #if ENABLE(JIT) |
|
106 #define THUNK_GENERATOR(generator) , generator |
|
107 #else |
|
108 #define THUNK_GENERATOR(generator) |
|
109 #endif |
|
110 |
|
111 static const HashTableValue JSHTMLLegendElementPrototypeTableValues[1] = |
|
112 { |
|
113 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
114 }; |
|
115 |
|
116 #undef THUNK_GENERATOR |
|
117 static JSC_CONST_HASHTABLE HashTable JSHTMLLegendElementPrototypeTable = { 1, 0, JSHTMLLegendElementPrototypeTableValues, 0 }; |
|
118 const ClassInfo JSHTMLLegendElementPrototype::s_info = { "HTMLLegendElementPrototype", 0, &JSHTMLLegendElementPrototypeTable, 0 }; |
|
119 |
|
120 JSObject* JSHTMLLegendElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
121 { |
|
122 return getDOMPrototype<JSHTMLLegendElement>(exec, globalObject); |
|
123 } |
|
124 |
|
125 const ClassInfo JSHTMLLegendElement::s_info = { "HTMLLegendElement", &JSHTMLElement::s_info, &JSHTMLLegendElementTable, 0 }; |
|
126 |
|
127 JSHTMLLegendElement::JSHTMLLegendElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLLegendElement> impl) |
|
128 : JSHTMLElement(structure, globalObject, impl) |
|
129 { |
|
130 } |
|
131 |
|
132 JSObject* JSHTMLLegendElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
133 { |
|
134 return new (exec) JSHTMLLegendElementPrototype(globalObject, JSHTMLLegendElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject))); |
|
135 } |
|
136 |
|
137 bool JSHTMLLegendElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
138 { |
|
139 return getStaticValueSlot<JSHTMLLegendElement, Base>(exec, &JSHTMLLegendElementTable, this, propertyName, slot); |
|
140 } |
|
141 |
|
142 bool JSHTMLLegendElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
143 { |
|
144 return getStaticValueDescriptor<JSHTMLLegendElement, Base>(exec, &JSHTMLLegendElementTable, this, propertyName, descriptor); |
|
145 } |
|
146 |
|
147 JSValue jsHTMLLegendElementForm(ExecState* exec, JSValue slotBase, const Identifier&) |
|
148 { |
|
149 JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(asObject(slotBase)); |
|
150 UNUSED_PARAM(exec); |
|
151 HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl()); |
|
152 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); |
|
153 return result; |
|
154 } |
|
155 |
|
156 JSValue jsHTMLLegendElementAccessKey(ExecState* exec, JSValue slotBase, const Identifier&) |
|
157 { |
|
158 JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(asObject(slotBase)); |
|
159 UNUSED_PARAM(exec); |
|
160 HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl()); |
|
161 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::accesskeyAttr)); |
|
162 return result; |
|
163 } |
|
164 |
|
165 JSValue jsHTMLLegendElementAlign(ExecState* exec, JSValue slotBase, const Identifier&) |
|
166 { |
|
167 JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(asObject(slotBase)); |
|
168 UNUSED_PARAM(exec); |
|
169 HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl()); |
|
170 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alignAttr)); |
|
171 return result; |
|
172 } |
|
173 |
|
174 JSValue jsHTMLLegendElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
175 { |
|
176 JSHTMLLegendElement* domObject = static_cast<JSHTMLLegendElement*>(asObject(slotBase)); |
|
177 return JSHTMLLegendElement::getConstructor(exec, domObject->globalObject()); |
|
178 } |
|
179 void JSHTMLLegendElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) |
|
180 { |
|
181 lookupPut<JSHTMLLegendElement, Base>(exec, propertyName, value, &JSHTMLLegendElementTable, this, slot); |
|
182 } |
|
183 |
|
184 void setJSHTMLLegendElementAccessKey(ExecState* exec, JSObject* thisObject, JSValue value) |
|
185 { |
|
186 JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(thisObject); |
|
187 HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl()); |
|
188 imp->setAttribute(WebCore::HTMLNames::accesskeyAttr, valueToStringWithNullCheck(exec, value)); |
|
189 } |
|
190 |
|
191 void setJSHTMLLegendElementAlign(ExecState* exec, JSObject* thisObject, JSValue value) |
|
192 { |
|
193 JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(thisObject); |
|
194 HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl()); |
|
195 imp->setAttribute(WebCore::HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value)); |
|
196 } |
|
197 |
|
198 JSValue JSHTMLLegendElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
199 { |
|
200 return getDOMConstructor<JSHTMLLegendElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
201 } |
|
202 |
|
203 |
|
204 } |