~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
*/
20
20
 
21
21
#include "config.h"
22
 
 
23
22
#include "JSHTMLTableSectionElement.h"
24
23
 
25
 
#include <wtf/GetPtr.h>
26
 
 
27
24
#include "HTMLCollection.h"
28
25
#include "HTMLElement.h"
29
26
#include "HTMLTableSectionElement.h"
30
27
#include "JSHTMLCollection.h"
31
28
#include "JSHTMLElement.h"
32
29
#include "KURL.h"
33
 
 
34
30
#include <runtime/Error.h>
35
 
#include <runtime/JSNumberCell.h>
36
31
#include <runtime/JSString.h>
 
32
#include <wtf/GetPtr.h>
37
33
 
38
34
using namespace JSC;
39
35
 
40
36
namespace WebCore {
41
37
 
42
 
ASSERT_CLASS_FITS_IN_CELL(JSHTMLTableSectionElement)
 
38
ASSERT_CLASS_FITS_IN_CELL(JSHTMLTableSectionElement);
43
39
 
44
40
/* Hash table */
45
41
 
54
50
    { 0, 0, 0, 0 }
55
51
};
56
52
 
57
 
static const HashTable JSHTMLTableSectionElementTable =
 
53
static JSC_CONST_HASHTABLE HashTable JSHTMLTableSectionElementTable =
58
54
#if ENABLE(PERFECT_HASH_SIZE)
59
55
    { 7, JSHTMLTableSectionElementTableValues, 0 };
60
56
#else
68
64
    { 0, 0, 0, 0 }
69
65
};
70
66
 
71
 
static const HashTable JSHTMLTableSectionElementConstructorTable =
 
67
static JSC_CONST_HASHTABLE HashTable JSHTMLTableSectionElementConstructorTable =
72
68
#if ENABLE(PERFECT_HASH_SIZE)
73
69
    { 0, JSHTMLTableSectionElementConstructorTableValues, 0 };
74
70
#else
75
71
    { 1, 0, JSHTMLTableSectionElementConstructorTableValues, 0 };
76
72
#endif
77
73
 
78
 
class JSHTMLTableSectionElementConstructor : public DOMObject {
 
74
class JSHTMLTableSectionElementConstructor : public DOMConstructorObject {
79
75
public:
80
 
    JSHTMLTableSectionElementConstructor(ExecState* exec)
81
 
        : DOMObject(JSHTMLTableSectionElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype()))
 
76
    JSHTMLTableSectionElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
 
77
        : DOMConstructorObject(JSHTMLTableSectionElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
82
78
    {
83
 
        putDirect(exec->propertyNames().prototype, JSHTMLTableSectionElementPrototype::self(exec, exec->lexicalGlobalObject()), None);
 
79
        putDirect(exec->propertyNames().prototype, JSHTMLTableSectionElementPrototype::self(exec, globalObject), None);
84
80
    }
85
81
    virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
 
82
    virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
86
83
    virtual const ClassInfo* classInfo() const { return &s_info; }
87
84
    static const ClassInfo s_info;
88
85
 
89
 
    static PassRefPtr<Structure> createStructure(JSValuePtr proto) 
 
86
    static PassRefPtr<Structure> createStructure(JSValue proto) 
90
87
    { 
91
88
        return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); 
92
89
    }
99
96
    return getStaticValueSlot<JSHTMLTableSectionElementConstructor, DOMObject>(exec, &JSHTMLTableSectionElementConstructorTable, this, propertyName, slot);
100
97
}
101
98
 
 
99
bool JSHTMLTableSectionElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
100
{
 
101
    return getStaticValueDescriptor<JSHTMLTableSectionElementConstructor, DOMObject>(exec, &JSHTMLTableSectionElementConstructorTable, this, propertyName, descriptor);
 
102
}
 
103
 
102
104
/* Hash table for prototype */
103
105
 
104
106
static const HashTableValue JSHTMLTableSectionElementPrototypeTableValues[3] =
108
110
    { 0, 0, 0, 0 }
109
111
};
110
112
 
111
 
static const HashTable JSHTMLTableSectionElementPrototypeTable =
 
113
static JSC_CONST_HASHTABLE HashTable JSHTMLTableSectionElementPrototypeTable =
112
114
#if ENABLE(PERFECT_HASH_SIZE)
113
115
    { 15, JSHTMLTableSectionElementPrototypeTableValues, 0 };
114
116
#else
127
129
    return getStaticFunctionSlot<JSObject>(exec, &JSHTMLTableSectionElementPrototypeTable, this, propertyName, slot);
128
130
}
129
131
 
 
132
bool JSHTMLTableSectionElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
133
{
 
134
    return getStaticFunctionDescriptor<JSObject>(exec, &JSHTMLTableSectionElementPrototypeTable, this, propertyName, descriptor);
 
135
}
 
136
 
130
137
const ClassInfo JSHTMLTableSectionElement::s_info = { "HTMLTableSectionElement", &JSHTMLElement::s_info, &JSHTMLTableSectionElementTable, 0 };
131
138
 
132
 
JSHTMLTableSectionElement::JSHTMLTableSectionElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLTableSectionElement> impl)
133
 
    : JSHTMLElement(structure, impl)
 
139
JSHTMLTableSectionElement::JSHTMLTableSectionElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTableSectionElement> impl)
 
140
    : JSHTMLElement(structure, globalObject, impl)
134
141
{
135
142
}
136
143
 
144
151
    return getStaticValueSlot<JSHTMLTableSectionElement, Base>(exec, &JSHTMLTableSectionElementTable, this, propertyName, slot);
145
152
}
146
153
 
147
 
JSValuePtr jsHTMLTableSectionElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot)
148
 
{
149
 
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->impl());
 
154
bool JSHTMLTableSectionElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
155
{
 
156
    return getStaticValueDescriptor<JSHTMLTableSectionElement, Base>(exec, &JSHTMLTableSectionElementTable, this, propertyName, descriptor);
 
157
}
 
158
 
 
159
JSValue jsHTMLTableSectionElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
160
{
 
161
    JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()));
 
162
    UNUSED_PARAM(exec);
 
163
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
150
164
    return jsString(exec, imp->align());
151
165
}
152
166
 
153
 
JSValuePtr jsHTMLTableSectionElementCh(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
167
JSValue jsHTMLTableSectionElementCh(ExecState* exec, const Identifier&, const PropertySlot& slot)
154
168
{
155
 
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->impl());
 
169
    JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()));
 
170
    UNUSED_PARAM(exec);
 
171
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
156
172
    return jsString(exec, imp->ch());
157
173
}
158
174
 
159
 
JSValuePtr jsHTMLTableSectionElementChOff(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
175
JSValue jsHTMLTableSectionElementChOff(ExecState* exec, const Identifier&, const PropertySlot& slot)
160
176
{
161
 
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->impl());
 
177
    JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()));
 
178
    UNUSED_PARAM(exec);
 
179
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
162
180
    return jsString(exec, imp->chOff());
163
181
}
164
182
 
165
 
JSValuePtr jsHTMLTableSectionElementVAlign(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
183
JSValue jsHTMLTableSectionElementVAlign(ExecState* exec, const Identifier&, const PropertySlot& slot)
166
184
{
167
 
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->impl());
 
185
    JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()));
 
186
    UNUSED_PARAM(exec);
 
187
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
168
188
    return jsString(exec, imp->vAlign());
169
189
}
170
190
 
171
 
JSValuePtr jsHTMLTableSectionElementRows(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
191
JSValue jsHTMLTableSectionElementRows(ExecState* exec, const Identifier&, const PropertySlot& slot)
172
192
{
173
 
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->impl());
174
 
    return toJS(exec, WTF::getPtr(imp->rows()));
 
193
    JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()));
 
194
    UNUSED_PARAM(exec);
 
195
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl());
 
196
    return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->rows()));
175
197
}
176
198
 
177
 
JSValuePtr jsHTMLTableSectionElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
199
JSValue jsHTMLTableSectionElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
178
200
{
179
 
    return static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->getConstructor(exec);
 
201
    JSHTMLTableSectionElement* domObject = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()));
 
202
    return JSHTMLTableSectionElement::getConstructor(exec, domObject->globalObject());
180
203
}
181
 
void JSHTMLTableSectionElement::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot)
 
204
void JSHTMLTableSectionElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
182
205
{
183
206
    lookupPut<JSHTMLTableSectionElement, Base>(exec, propertyName, value, &JSHTMLTableSectionElementTable, this, slot);
184
207
}
185
208
 
186
 
void setJSHTMLTableSectionElementAlign(ExecState* exec, JSObject* thisObject, JSValuePtr value)
 
209
void setJSHTMLTableSectionElementAlign(ExecState* exec, JSObject* thisObject, JSValue value)
187
210
{
188
211
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(thisObject)->impl());
189
212
    imp->setAlign(valueToStringWithNullCheck(exec, value));
190
213
}
191
214
 
192
 
void setJSHTMLTableSectionElementCh(ExecState* exec, JSObject* thisObject, JSValuePtr value)
 
215
void setJSHTMLTableSectionElementCh(ExecState* exec, JSObject* thisObject, JSValue value)
193
216
{
194
217
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(thisObject)->impl());
195
218
    imp->setCh(valueToStringWithNullCheck(exec, value));
196
219
}
197
220
 
198
 
void setJSHTMLTableSectionElementChOff(ExecState* exec, JSObject* thisObject, JSValuePtr value)
 
221
void setJSHTMLTableSectionElementChOff(ExecState* exec, JSObject* thisObject, JSValue value)
199
222
{
200
223
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(thisObject)->impl());
201
224
    imp->setChOff(valueToStringWithNullCheck(exec, value));
202
225
}
203
226
 
204
 
void setJSHTMLTableSectionElementVAlign(ExecState* exec, JSObject* thisObject, JSValuePtr value)
 
227
void setJSHTMLTableSectionElementVAlign(ExecState* exec, JSObject* thisObject, JSValue value)
205
228
{
206
229
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(thisObject)->impl());
207
230
    imp->setVAlign(valueToStringWithNullCheck(exec, value));
208
231
}
209
232
 
210
 
JSValuePtr JSHTMLTableSectionElement::getConstructor(ExecState* exec)
 
233
JSValue JSHTMLTableSectionElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
211
234
{
212
 
    return getDOMConstructor<JSHTMLTableSectionElementConstructor>(exec);
 
235
    return getDOMConstructor<JSHTMLTableSectionElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
213
236
}
214
237
 
215
 
JSValuePtr jsHTMLTableSectionElementPrototypeFunctionInsertRow(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
 
238
JSValue JSC_HOST_CALL jsHTMLTableSectionElementPrototypeFunctionInsertRow(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
216
239
{
217
 
    if (!thisValue->isObject(&JSHTMLTableSectionElement::s_info))
 
240
    UNUSED_PARAM(args);
 
241
    if (!thisValue.inherits(&JSHTMLTableSectionElement::s_info))
218
242
        return throwError(exec, TypeError);
219
243
    JSHTMLTableSectionElement* castedThisObj = static_cast<JSHTMLTableSectionElement*>(asObject(thisValue));
220
244
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThisObj->impl());
221
245
    ExceptionCode ec = 0;
222
 
    int index = args.at(exec, 0)->toInt32(exec);
223
 
 
224
 
 
225
 
    JSC::JSValuePtr result = toJS(exec, WTF::getPtr(imp->insertRow(index, ec)));
 
246
    int index = args.at(0).toInt32(exec);
 
247
 
 
248
 
 
249
    JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->insertRow(index, ec)));
226
250
    setDOMException(exec, ec);
227
251
    return result;
228
252
}
229
253
 
230
 
JSValuePtr jsHTMLTableSectionElementPrototypeFunctionDeleteRow(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
 
254
JSValue JSC_HOST_CALL jsHTMLTableSectionElementPrototypeFunctionDeleteRow(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
231
255
{
232
 
    if (!thisValue->isObject(&JSHTMLTableSectionElement::s_info))
 
256
    UNUSED_PARAM(args);
 
257
    if (!thisValue.inherits(&JSHTMLTableSectionElement::s_info))
233
258
        return throwError(exec, TypeError);
234
259
    JSHTMLTableSectionElement* castedThisObj = static_cast<JSHTMLTableSectionElement*>(asObject(thisValue));
235
260
    HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThisObj->impl());
236
261
    ExceptionCode ec = 0;
237
 
    int index = args.at(exec, 0)->toInt32(exec);
 
262
    int index = args.at(0).toInt32(exec);
238
263
 
239
264
    imp->deleteRow(index, ec);
240
265
    setDOMException(exec, ec);
241
266
    return jsUndefined();
242
267
}
243
268
 
244
 
HTMLTableSectionElement* toHTMLTableSectionElement(JSC::JSValuePtr value)
 
269
HTMLTableSectionElement* toHTMLTableSectionElement(JSC::JSValue value)
245
270
{
246
 
    return value->isObject(&JSHTMLTableSectionElement::s_info) ? static_cast<JSHTMLTableSectionElement*>(asObject(value))->impl() : 0;
 
271
    return value.inherits(&JSHTMLTableSectionElement::s_info) ? static_cast<JSHTMLTableSectionElement*>(asObject(value))->impl() : 0;
247
272
}
248
273
 
249
274
}