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

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.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 "JSXMLHttpRequestProgressEvent.h"
24
23
 
25
 
#include <wtf/GetPtr.h>
26
 
 
27
24
#include "XMLHttpRequestProgressEvent.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(JSXMLHttpRequestProgressEvent)
 
32
ASSERT_CLASS_FITS_IN_CELL(JSXMLHttpRequestProgressEvent);
36
33
 
37
34
/* Hash table */
38
35
 
44
41
    { 0, 0, 0, 0 }
45
42
};
46
43
 
47
 
static const HashTable JSXMLHttpRequestProgressEventTable =
 
44
static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventTable =
48
45
#if ENABLE(PERFECT_HASH_SIZE)
49
46
    { 15, JSXMLHttpRequestProgressEventTableValues, 0 };
50
47
#else
58
55
    { 0, 0, 0, 0 }
59
56
};
60
57
 
61
 
static const HashTable JSXMLHttpRequestProgressEventConstructorTable =
 
58
static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventConstructorTable =
62
59
#if ENABLE(PERFECT_HASH_SIZE)
63
60
    { 0, JSXMLHttpRequestProgressEventConstructorTableValues, 0 };
64
61
#else
65
62
    { 1, 0, JSXMLHttpRequestProgressEventConstructorTableValues, 0 };
66
63
#endif
67
64
 
68
 
class JSXMLHttpRequestProgressEventConstructor : public DOMObject {
 
65
class JSXMLHttpRequestProgressEventConstructor : public DOMConstructorObject {
69
66
public:
70
 
    JSXMLHttpRequestProgressEventConstructor(ExecState* exec)
71
 
        : DOMObject(JSXMLHttpRequestProgressEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype()))
 
67
    JSXMLHttpRequestProgressEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
 
68
        : DOMConstructorObject(JSXMLHttpRequestProgressEventConstructor::createStructure(globalObject->objectPrototype()), globalObject)
72
69
    {
73
 
        putDirect(exec->propertyNames().prototype, JSXMLHttpRequestProgressEventPrototype::self(exec, exec->lexicalGlobalObject()), None);
 
70
        putDirect(exec->propertyNames().prototype, JSXMLHttpRequestProgressEventPrototype::self(exec, globalObject), None);
74
71
    }
75
72
    virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
 
73
    virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
76
74
    virtual const ClassInfo* classInfo() const { return &s_info; }
77
75
    static const ClassInfo s_info;
78
76
 
79
 
    static PassRefPtr<Structure> createStructure(JSValuePtr proto) 
 
77
    static PassRefPtr<Structure> createStructure(JSValue proto) 
80
78
    { 
81
79
        return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); 
82
80
    }
89
87
    return getStaticValueSlot<JSXMLHttpRequestProgressEventConstructor, DOMObject>(exec, &JSXMLHttpRequestProgressEventConstructorTable, this, propertyName, slot);
90
88
}
91
89
 
 
90
bool JSXMLHttpRequestProgressEventConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
91
{
 
92
    return getStaticValueDescriptor<JSXMLHttpRequestProgressEventConstructor, DOMObject>(exec, &JSXMLHttpRequestProgressEventConstructorTable, this, propertyName, descriptor);
 
93
}
 
94
 
92
95
/* Hash table for prototype */
93
96
 
94
97
static const HashTableValue JSXMLHttpRequestProgressEventPrototypeTableValues[1] =
96
99
    { 0, 0, 0, 0 }
97
100
};
98
101
 
99
 
static const HashTable JSXMLHttpRequestProgressEventPrototypeTable =
 
102
static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventPrototypeTable =
100
103
#if ENABLE(PERFECT_HASH_SIZE)
101
104
    { 0, JSXMLHttpRequestProgressEventPrototypeTableValues, 0 };
102
105
#else
103
106
    { 1, 0, JSXMLHttpRequestProgressEventPrototypeTableValues, 0 };
104
107
#endif
105
108
 
106
 
const ClassInfo JSXMLHttpRequestProgressEventPrototype::s_info = { "XMLHttpRequestProgressEventPrototype", 0, &JSXMLHttpRequestProgressEventPrototypeTable, 0 };
 
109
static const HashTable* getJSXMLHttpRequestProgressEventPrototypeTable(ExecState* exec)
 
110
{
 
111
    return getHashTableForGlobalData(exec->globalData(), &JSXMLHttpRequestProgressEventPrototypeTable);
 
112
}
 
113
const ClassInfo JSXMLHttpRequestProgressEventPrototype::s_info = { "XMLHttpRequestProgressEventPrototype", 0, 0, getJSXMLHttpRequestProgressEventPrototypeTable };
107
114
 
108
115
JSObject* JSXMLHttpRequestProgressEventPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
109
116
{
110
117
    return getDOMPrototype<JSXMLHttpRequestProgressEvent>(exec, globalObject);
111
118
}
112
119
 
113
 
const ClassInfo JSXMLHttpRequestProgressEvent::s_info = { "XMLHttpRequestProgressEvent", &JSProgressEvent::s_info, &JSXMLHttpRequestProgressEventTable, 0 };
 
120
static const HashTable* getJSXMLHttpRequestProgressEventTable(ExecState* exec)
 
121
{
 
122
    return getHashTableForGlobalData(exec->globalData(), &JSXMLHttpRequestProgressEventTable);
 
123
}
 
124
const ClassInfo JSXMLHttpRequestProgressEvent::s_info = { "XMLHttpRequestProgressEvent", &JSProgressEvent::s_info, 0, getJSXMLHttpRequestProgressEventTable };
114
125
 
115
 
JSXMLHttpRequestProgressEvent::JSXMLHttpRequestProgressEvent(PassRefPtr<Structure> structure, PassRefPtr<XMLHttpRequestProgressEvent> impl)
116
 
    : JSProgressEvent(structure, impl)
 
126
JSXMLHttpRequestProgressEvent::JSXMLHttpRequestProgressEvent(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XMLHttpRequestProgressEvent> impl)
 
127
    : JSProgressEvent(structure, globalObject, impl)
117
128
{
118
129
}
119
130
 
124
135
 
125
136
bool JSXMLHttpRequestProgressEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
126
137
{
127
 
    return getStaticValueSlot<JSXMLHttpRequestProgressEvent, Base>(exec, &JSXMLHttpRequestProgressEventTable, this, propertyName, slot);
128
 
}
129
 
 
130
 
JSValuePtr jsXMLHttpRequestProgressEventPosition(ExecState* exec, const Identifier&, const PropertySlot& slot)
131
 
{
132
 
    XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase()))->impl());
 
138
    return getStaticValueSlot<JSXMLHttpRequestProgressEvent, Base>(exec, getJSXMLHttpRequestProgressEventTable(exec), this, propertyName, slot);
 
139
}
 
140
 
 
141
bool JSXMLHttpRequestProgressEvent::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
142
{
 
143
    return getStaticValueDescriptor<JSXMLHttpRequestProgressEvent, Base>(exec, getJSXMLHttpRequestProgressEventTable(exec), this, propertyName, descriptor);
 
144
}
 
145
 
 
146
JSValue jsXMLHttpRequestProgressEventPosition(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
147
{
 
148
    JSXMLHttpRequestProgressEvent* castedThis = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase()));
 
149
    UNUSED_PARAM(exec);
 
150
    XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(castedThis->impl());
133
151
    return jsNumber(exec, imp->position());
134
152
}
135
153
 
136
 
JSValuePtr jsXMLHttpRequestProgressEventTotalSize(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
154
JSValue jsXMLHttpRequestProgressEventTotalSize(ExecState* exec, const Identifier&, const PropertySlot& slot)
137
155
{
138
 
    XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase()))->impl());
 
156
    JSXMLHttpRequestProgressEvent* castedThis = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase()));
 
157
    UNUSED_PARAM(exec);
 
158
    XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(castedThis->impl());
139
159
    return jsNumber(exec, imp->totalSize());
140
160
}
141
161
 
142
 
JSValuePtr jsXMLHttpRequestProgressEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
162
JSValue jsXMLHttpRequestProgressEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
143
163
{
144
 
    return static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase()))->getConstructor(exec);
 
164
    JSXMLHttpRequestProgressEvent* domObject = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase()));
 
165
    return JSXMLHttpRequestProgressEvent::getConstructor(exec, domObject->globalObject());
145
166
}
146
 
JSValuePtr JSXMLHttpRequestProgressEvent::getConstructor(ExecState* exec)
 
167
JSValue JSXMLHttpRequestProgressEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
147
168
{
148
 
    return getDOMConstructor<JSXMLHttpRequestProgressEventConstructor>(exec);
 
169
    return getDOMConstructor<JSXMLHttpRequestProgressEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
149
170
}
150
171
 
151
172