tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSXMLHttpRequestProgressEvent.cpp
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 "JSXMLHttpRequestProgressEvent.h"
23
24 #include "XMLHttpRequestProgressEvent.h"
25 #include <wtf/GetPtr.h>
26
27 using namespace JSC;
28
29 namespace WebCore {
30
31 ASSERT_CLASS_FITS_IN_CELL(JSXMLHttpRequestProgressEvent);
32
33 /* Hash table */
34 #if ENABLE(JIT)
35 #define THUNK_GENERATOR(generator) , generator
36 #else
37 #define THUNK_GENERATOR(generator)
38 #endif
39 #if ENABLE(DFG_JIT)
40 #define INTRINSIC(intrinsic) , intrinsic
41 #else
42 #define INTRINSIC(intrinsic)
43 #endif
44
45 static const HashTableValue JSXMLHttpRequestProgressEventTableValues[] =
46 {
47     { "position", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestProgressEventPosition), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
48     { "totalSize", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestProgressEventTotalSize), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
49     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestProgressEventConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
50     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
51 };
52
53 #undef THUNK_GENERATOR
54 static const HashTable JSXMLHttpRequestProgressEventTable = { 9, 7, JSXMLHttpRequestProgressEventTableValues, 0 };
55 /* Hash table for constructor */
56 #if ENABLE(JIT)
57 #define THUNK_GENERATOR(generator) , generator
58 #else
59 #define THUNK_GENERATOR(generator)
60 #endif
61 #if ENABLE(DFG_JIT)
62 #define INTRINSIC(intrinsic) , intrinsic
63 #else
64 #define INTRINSIC(intrinsic)
65 #endif
66
67 static const HashTableValue JSXMLHttpRequestProgressEventConstructorTableValues[] =
68 {
69     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
70 };
71
72 #undef THUNK_GENERATOR
73 static const HashTable JSXMLHttpRequestProgressEventConstructorTable = { 1, 0, JSXMLHttpRequestProgressEventConstructorTableValues, 0 };
74 const ClassInfo JSXMLHttpRequestProgressEventConstructor::s_info = { "XMLHttpRequestProgressEventConstructor", &DOMConstructorObject::s_info, &JSXMLHttpRequestProgressEventConstructorTable, 0, CREATE_METHOD_TABLE(JSXMLHttpRequestProgressEventConstructor) };
75
76 JSXMLHttpRequestProgressEventConstructor::JSXMLHttpRequestProgressEventConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
77     : DOMConstructorObject(structure, globalObject)
78 {
79 }
80
81 void JSXMLHttpRequestProgressEventConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
82 {
83     Base::finishCreation(exec->globalData());
84     ASSERT(inherits(&s_info));
85     putDirect(exec->globalData(), exec->propertyNames().prototype, JSXMLHttpRequestProgressEventPrototype::self(exec, globalObject), DontDelete | ReadOnly);
86 }
87
88 bool JSXMLHttpRequestProgressEventConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
89 {
90     return getStaticValueSlot<JSXMLHttpRequestProgressEventConstructor, JSDOMWrapper>(exec, &JSXMLHttpRequestProgressEventConstructorTable, static_cast<JSXMLHttpRequestProgressEventConstructor*>(cell), propertyName, slot);
91 }
92
93 bool JSXMLHttpRequestProgressEventConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
94 {
95     return getStaticValueDescriptor<JSXMLHttpRequestProgressEventConstructor, JSDOMWrapper>(exec, &JSXMLHttpRequestProgressEventConstructorTable, static_cast<JSXMLHttpRequestProgressEventConstructor*>(object), propertyName, descriptor);
96 }
97
98 /* Hash table for prototype */
99 #if ENABLE(JIT)
100 #define THUNK_GENERATOR(generator) , generator
101 #else
102 #define THUNK_GENERATOR(generator)
103 #endif
104 #if ENABLE(DFG_JIT)
105 #define INTRINSIC(intrinsic) , intrinsic
106 #else
107 #define INTRINSIC(intrinsic)
108 #endif
109
110 static const HashTableValue JSXMLHttpRequestProgressEventPrototypeTableValues[] =
111 {
112     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
113 };
114
115 #undef THUNK_GENERATOR
116 static const HashTable JSXMLHttpRequestProgressEventPrototypeTable = { 1, 0, JSXMLHttpRequestProgressEventPrototypeTableValues, 0 };
117 static const HashTable* getJSXMLHttpRequestProgressEventPrototypeTable(ExecState* exec)
118 {
119     return getHashTableForGlobalData(exec->globalData(), &JSXMLHttpRequestProgressEventPrototypeTable);
120 }
121
122 const ClassInfo JSXMLHttpRequestProgressEventPrototype::s_info = { "XMLHttpRequestProgressEventPrototype", &JSC::JSNonFinalObject::s_info, 0, getJSXMLHttpRequestProgressEventPrototypeTable, CREATE_METHOD_TABLE(JSXMLHttpRequestProgressEventPrototype) };
123
124 JSObject* JSXMLHttpRequestProgressEventPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
125 {
126     return getDOMPrototype<JSXMLHttpRequestProgressEvent>(exec, globalObject);
127 }
128
129 static const HashTable* getJSXMLHttpRequestProgressEventTable(ExecState* exec)
130 {
131     return getHashTableForGlobalData(exec->globalData(), &JSXMLHttpRequestProgressEventTable);
132 }
133
134 const ClassInfo JSXMLHttpRequestProgressEvent::s_info = { "XMLHttpRequestProgressEvent", &JSProgressEvent::s_info, 0, getJSXMLHttpRequestProgressEventTable , CREATE_METHOD_TABLE(JSXMLHttpRequestProgressEvent) };
135
136 JSXMLHttpRequestProgressEvent::JSXMLHttpRequestProgressEvent(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<XMLHttpRequestProgressEvent> impl)
137     : JSProgressEvent(structure, globalObject, impl)
138 {
139 }
140
141 void JSXMLHttpRequestProgressEvent::finishCreation(JSGlobalData& globalData)
142 {
143     Base::finishCreation(globalData);
144     ASSERT(inherits(&s_info));
145 }
146
147 JSObject* JSXMLHttpRequestProgressEvent::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
148 {
149     return JSXMLHttpRequestProgressEventPrototype::create(exec->globalData(), globalObject, JSXMLHttpRequestProgressEventPrototype::createStructure(exec->globalData(), globalObject, JSProgressEventPrototype::self(exec, globalObject)));
150 }
151
152 bool JSXMLHttpRequestProgressEvent::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
153 {
154     JSXMLHttpRequestProgressEvent* thisObject = jsCast<JSXMLHttpRequestProgressEvent*>(cell);
155     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
156     return getStaticValueSlot<JSXMLHttpRequestProgressEvent, Base>(exec, getJSXMLHttpRequestProgressEventTable(exec), thisObject, propertyName, slot);
157 }
158
159 bool JSXMLHttpRequestProgressEvent::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
160 {
161     JSXMLHttpRequestProgressEvent* thisObject = jsCast<JSXMLHttpRequestProgressEvent*>(object);
162     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
163     return getStaticValueDescriptor<JSXMLHttpRequestProgressEvent, Base>(exec, getJSXMLHttpRequestProgressEventTable(exec), thisObject, propertyName, descriptor);
164 }
165
166 JSValue jsXMLHttpRequestProgressEventPosition(ExecState* exec, JSValue slotBase, const Identifier&)
167 {
168     JSXMLHttpRequestProgressEvent* castedThis = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slotBase));
169     UNUSED_PARAM(exec);
170     XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(castedThis->impl());
171     JSValue result = jsNumber(imp->position());
172     return result;
173 }
174
175
176 JSValue jsXMLHttpRequestProgressEventTotalSize(ExecState* exec, JSValue slotBase, const Identifier&)
177 {
178     JSXMLHttpRequestProgressEvent* castedThis = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slotBase));
179     UNUSED_PARAM(exec);
180     XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(castedThis->impl());
181     JSValue result = jsNumber(imp->totalSize());
182     return result;
183 }
184
185
186 JSValue jsXMLHttpRequestProgressEventConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
187 {
188     JSXMLHttpRequestProgressEvent* domObject = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slotBase));
189     return JSXMLHttpRequestProgressEvent::getConstructor(exec, domObject->globalObject());
190 }
191
192 JSValue JSXMLHttpRequestProgressEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
193 {
194     return getDOMConstructor<JSXMLHttpRequestProgressEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
195 }
196
197
198 }