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

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/generated/JSWheelEvent.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 "JSWheelEvent.h"
24
23
 
25
 
#include <wtf/GetPtr.h>
26
 
 
27
24
#include "WheelEvent.h"
28
 
 
29
25
#include <runtime/JSNumberCell.h>
 
26
#include <wtf/GetPtr.h>
30
27
 
31
28
using namespace JSC;
32
29
 
33
30
namespace WebCore {
34
31
 
35
 
ASSERT_CLASS_FITS_IN_CELL(JSWheelEvent)
 
32
ASSERT_CLASS_FITS_IN_CELL(JSWheelEvent);
36
33
 
37
34
/* Hash table */
38
35
 
57
54
    { 0, 0, 0, 0 }
58
55
};
59
56
 
60
 
static const HashTable JSWheelEventTable =
 
57
static JSC_CONST_HASHTABLE HashTable JSWheelEventTable =
61
58
#if ENABLE(PERFECT_HASH_SIZE)
62
59
    { 127, JSWheelEventTableValues, 0 };
63
60
#else
71
68
    { 0, 0, 0, 0 }
72
69
};
73
70
 
74
 
static const HashTable JSWheelEventConstructorTable =
 
71
static JSC_CONST_HASHTABLE HashTable JSWheelEventConstructorTable =
75
72
#if ENABLE(PERFECT_HASH_SIZE)
76
73
    { 0, JSWheelEventConstructorTableValues, 0 };
77
74
#else
78
75
    { 1, 0, JSWheelEventConstructorTableValues, 0 };
79
76
#endif
80
77
 
81
 
class JSWheelEventConstructor : public DOMObject {
 
78
class JSWheelEventConstructor : public DOMConstructorObject {
82
79
public:
83
 
    JSWheelEventConstructor(ExecState* exec)
84
 
        : DOMObject(JSWheelEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype()))
 
80
    JSWheelEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
 
81
        : DOMConstructorObject(JSWheelEventConstructor::createStructure(globalObject->objectPrototype()), globalObject)
85
82
    {
86
 
        putDirect(exec->propertyNames().prototype, JSWheelEventPrototype::self(exec, exec->lexicalGlobalObject()), None);
 
83
        putDirect(exec->propertyNames().prototype, JSWheelEventPrototype::self(exec, globalObject), None);
87
84
    }
88
85
    virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
 
86
    virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
89
87
    virtual const ClassInfo* classInfo() const { return &s_info; }
90
88
    static const ClassInfo s_info;
91
89
 
92
 
    static PassRefPtr<Structure> createStructure(JSValuePtr proto) 
 
90
    static PassRefPtr<Structure> createStructure(JSValue proto) 
93
91
    { 
94
92
        return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); 
95
93
    }
102
100
    return getStaticValueSlot<JSWheelEventConstructor, DOMObject>(exec, &JSWheelEventConstructorTable, this, propertyName, slot);
103
101
}
104
102
 
 
103
bool JSWheelEventConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
104
{
 
105
    return getStaticValueDescriptor<JSWheelEventConstructor, DOMObject>(exec, &JSWheelEventConstructorTable, this, propertyName, descriptor);
 
106
}
 
107
 
105
108
/* Hash table for prototype */
106
109
 
107
110
static const HashTableValue JSWheelEventPrototypeTableValues[1] =
109
112
    { 0, 0, 0, 0 }
110
113
};
111
114
 
112
 
static const HashTable JSWheelEventPrototypeTable =
 
115
static JSC_CONST_HASHTABLE HashTable JSWheelEventPrototypeTable =
113
116
#if ENABLE(PERFECT_HASH_SIZE)
114
117
    { 0, JSWheelEventPrototypeTableValues, 0 };
115
118
#else
125
128
 
126
129
const ClassInfo JSWheelEvent::s_info = { "WheelEvent", &JSUIEvent::s_info, &JSWheelEventTable, 0 };
127
130
 
128
 
JSWheelEvent::JSWheelEvent(PassRefPtr<Structure> structure, PassRefPtr<WheelEvent> impl)
129
 
    : JSUIEvent(structure, impl)
 
131
JSWheelEvent::JSWheelEvent(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WheelEvent> impl)
 
132
    : JSUIEvent(structure, globalObject, impl)
130
133
{
131
134
}
132
135
 
140
143
    return getStaticValueSlot<JSWheelEvent, Base>(exec, &JSWheelEventTable, this, propertyName, slot);
141
144
}
142
145
 
143
 
JSValuePtr jsWheelEventScreenX(ExecState* exec, const Identifier&, const PropertySlot& slot)
144
 
{
145
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
146
bool JSWheelEvent::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
147
{
 
148
    return getStaticValueDescriptor<JSWheelEvent, Base>(exec, &JSWheelEventTable, this, propertyName, descriptor);
 
149
}
 
150
 
 
151
JSValue jsWheelEventScreenX(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
152
{
 
153
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
154
    UNUSED_PARAM(exec);
 
155
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
146
156
    return jsNumber(exec, imp->screenX());
147
157
}
148
158
 
149
 
JSValuePtr jsWheelEventScreenY(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
159
JSValue jsWheelEventScreenY(ExecState* exec, const Identifier&, const PropertySlot& slot)
150
160
{
151
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
161
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
162
    UNUSED_PARAM(exec);
 
163
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
152
164
    return jsNumber(exec, imp->screenY());
153
165
}
154
166
 
155
 
JSValuePtr jsWheelEventClientX(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
167
JSValue jsWheelEventClientX(ExecState* exec, const Identifier&, const PropertySlot& slot)
156
168
{
157
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
169
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
170
    UNUSED_PARAM(exec);
 
171
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
158
172
    return jsNumber(exec, imp->clientX());
159
173
}
160
174
 
161
 
JSValuePtr jsWheelEventClientY(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
175
JSValue jsWheelEventClientY(ExecState* exec, const Identifier&, const PropertySlot& slot)
162
176
{
163
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
177
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
178
    UNUSED_PARAM(exec);
 
179
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
164
180
    return jsNumber(exec, imp->clientY());
165
181
}
166
182
 
167
 
JSValuePtr jsWheelEventCtrlKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
183
JSValue jsWheelEventCtrlKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
168
184
{
169
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
185
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
186
    UNUSED_PARAM(exec);
 
187
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
170
188
    return jsBoolean(imp->ctrlKey());
171
189
}
172
190
 
173
 
JSValuePtr jsWheelEventShiftKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
191
JSValue jsWheelEventShiftKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
174
192
{
175
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
193
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
194
    UNUSED_PARAM(exec);
 
195
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
176
196
    return jsBoolean(imp->shiftKey());
177
197
}
178
198
 
179
 
JSValuePtr jsWheelEventAltKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
199
JSValue jsWheelEventAltKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
180
200
{
181
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
201
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
202
    UNUSED_PARAM(exec);
 
203
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
182
204
    return jsBoolean(imp->altKey());
183
205
}
184
206
 
185
 
JSValuePtr jsWheelEventMetaKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
207
JSValue jsWheelEventMetaKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
186
208
{
187
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
209
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
210
    UNUSED_PARAM(exec);
 
211
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
188
212
    return jsBoolean(imp->metaKey());
189
213
}
190
214
 
191
 
JSValuePtr jsWheelEventWheelDelta(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
215
JSValue jsWheelEventWheelDelta(ExecState* exec, const Identifier&, const PropertySlot& slot)
192
216
{
193
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
217
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
218
    UNUSED_PARAM(exec);
 
219
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
194
220
    return jsNumber(exec, imp->wheelDelta());
195
221
}
196
222
 
197
 
JSValuePtr jsWheelEventWheelDeltaX(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
223
JSValue jsWheelEventWheelDeltaX(ExecState* exec, const Identifier&, const PropertySlot& slot)
198
224
{
199
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
225
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
226
    UNUSED_PARAM(exec);
 
227
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
200
228
    return jsNumber(exec, imp->wheelDeltaX());
201
229
}
202
230
 
203
 
JSValuePtr jsWheelEventWheelDeltaY(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
231
JSValue jsWheelEventWheelDeltaY(ExecState* exec, const Identifier&, const PropertySlot& slot)
204
232
{
205
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
233
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
234
    UNUSED_PARAM(exec);
 
235
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
206
236
    return jsNumber(exec, imp->wheelDeltaY());
207
237
}
208
238
 
209
 
JSValuePtr jsWheelEventOffsetX(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
239
JSValue jsWheelEventOffsetX(ExecState* exec, const Identifier&, const PropertySlot& slot)
210
240
{
211
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
241
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
242
    UNUSED_PARAM(exec);
 
243
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
212
244
    return jsNumber(exec, imp->offsetX());
213
245
}
214
246
 
215
 
JSValuePtr jsWheelEventOffsetY(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
247
JSValue jsWheelEventOffsetY(ExecState* exec, const Identifier&, const PropertySlot& slot)
216
248
{
217
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
249
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
250
    UNUSED_PARAM(exec);
 
251
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
218
252
    return jsNumber(exec, imp->offsetY());
219
253
}
220
254
 
221
 
JSValuePtr jsWheelEventX(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
255
JSValue jsWheelEventX(ExecState* exec, const Identifier&, const PropertySlot& slot)
222
256
{
223
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
257
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
258
    UNUSED_PARAM(exec);
 
259
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
224
260
    return jsNumber(exec, imp->x());
225
261
}
226
262
 
227
 
JSValuePtr jsWheelEventY(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
263
JSValue jsWheelEventY(ExecState* exec, const Identifier&, const PropertySlot& slot)
228
264
{
229
 
    WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl());
 
265
    JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
266
    UNUSED_PARAM(exec);
 
267
    WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl());
230
268
    return jsNumber(exec, imp->y());
231
269
}
232
270
 
233
 
JSValuePtr jsWheelEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
271
JSValue jsWheelEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
234
272
{
235
 
    return static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->getConstructor(exec);
 
273
    JSWheelEvent* domObject = static_cast<JSWheelEvent*>(asObject(slot.slotBase()));
 
274
    return JSWheelEvent::getConstructor(exec, domObject->globalObject());
236
275
}
237
 
JSValuePtr JSWheelEvent::getConstructor(ExecState* exec)
 
276
JSValue JSWheelEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
238
277
{
239
 
    return getDOMConstructor<JSWheelEventConstructor>(exec);
 
278
    return getDOMConstructor<JSWheelEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
240
279
}
241
280
 
242
281