|
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 <runtime/JSNumberCell.h> |
|
26 #include <wtf/GetPtr.h> |
|
27 |
|
28 using namespace JSC; |
|
29 |
|
30 namespace WebCore { |
|
31 |
|
32 ASSERT_CLASS_FITS_IN_CELL(JSXMLHttpRequestProgressEvent); |
|
33 |
|
34 /* Hash table */ |
|
35 #if ENABLE(JIT) |
|
36 #define THUNK_GENERATOR(generator) , generator |
|
37 #else |
|
38 #define THUNK_GENERATOR(generator) |
|
39 #endif |
|
40 |
|
41 static const HashTableValue JSXMLHttpRequestProgressEventTableValues[4] = |
|
42 { |
|
43 { "position", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestProgressEventPosition), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
44 { "totalSize", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestProgressEventTotalSize), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
45 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestProgressEventConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
46 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
47 }; |
|
48 |
|
49 #undef THUNK_GENERATOR |
|
50 static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventTable = { 9, 7, JSXMLHttpRequestProgressEventTableValues, 0 }; |
|
51 /* Hash table for constructor */ |
|
52 #if ENABLE(JIT) |
|
53 #define THUNK_GENERATOR(generator) , generator |
|
54 #else |
|
55 #define THUNK_GENERATOR(generator) |
|
56 #endif |
|
57 |
|
58 static const HashTableValue JSXMLHttpRequestProgressEventConstructorTableValues[1] = |
|
59 { |
|
60 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
61 }; |
|
62 |
|
63 #undef THUNK_GENERATOR |
|
64 static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventConstructorTable = { 1, 0, JSXMLHttpRequestProgressEventConstructorTableValues, 0 }; |
|
65 class JSXMLHttpRequestProgressEventConstructor : public DOMConstructorObject { |
|
66 public: |
|
67 JSXMLHttpRequestProgressEventConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
68 |
|
69 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
70 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
71 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
72 static const JSC::ClassInfo s_info; |
|
73 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
74 { |
|
75 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
76 } |
|
77 protected: |
|
78 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
79 }; |
|
80 |
|
81 const ClassInfo JSXMLHttpRequestProgressEventConstructor::s_info = { "XMLHttpRequestProgressEventConstructor", 0, &JSXMLHttpRequestProgressEventConstructorTable, 0 }; |
|
82 |
|
83 JSXMLHttpRequestProgressEventConstructor::JSXMLHttpRequestProgressEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
84 : DOMConstructorObject(JSXMLHttpRequestProgressEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
85 { |
|
86 putDirect(exec->propertyNames().prototype, JSXMLHttpRequestProgressEventPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
87 } |
|
88 |
|
89 bool JSXMLHttpRequestProgressEventConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
90 { |
|
91 return getStaticValueSlot<JSXMLHttpRequestProgressEventConstructor, DOMObject>(exec, &JSXMLHttpRequestProgressEventConstructorTable, this, propertyName, slot); |
|
92 } |
|
93 |
|
94 bool JSXMLHttpRequestProgressEventConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
95 { |
|
96 return getStaticValueDescriptor<JSXMLHttpRequestProgressEventConstructor, DOMObject>(exec, &JSXMLHttpRequestProgressEventConstructorTable, this, propertyName, descriptor); |
|
97 } |
|
98 |
|
99 /* Hash table for prototype */ |
|
100 #if ENABLE(JIT) |
|
101 #define THUNK_GENERATOR(generator) , generator |
|
102 #else |
|
103 #define THUNK_GENERATOR(generator) |
|
104 #endif |
|
105 |
|
106 static const HashTableValue JSXMLHttpRequestProgressEventPrototypeTableValues[1] = |
|
107 { |
|
108 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
109 }; |
|
110 |
|
111 #undef THUNK_GENERATOR |
|
112 static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventPrototypeTable = { 1, 0, JSXMLHttpRequestProgressEventPrototypeTableValues, 0 }; |
|
113 static const HashTable* getJSXMLHttpRequestProgressEventPrototypeTable(ExecState* exec) |
|
114 { |
|
115 return getHashTableForGlobalData(exec->globalData(), &JSXMLHttpRequestProgressEventPrototypeTable); |
|
116 } |
|
117 const ClassInfo JSXMLHttpRequestProgressEventPrototype::s_info = { "XMLHttpRequestProgressEventPrototype", 0, 0, getJSXMLHttpRequestProgressEventPrototypeTable }; |
|
118 |
|
119 JSObject* JSXMLHttpRequestProgressEventPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
120 { |
|
121 return getDOMPrototype<JSXMLHttpRequestProgressEvent>(exec, globalObject); |
|
122 } |
|
123 |
|
124 static const HashTable* getJSXMLHttpRequestProgressEventTable(ExecState* exec) |
|
125 { |
|
126 return getHashTableForGlobalData(exec->globalData(), &JSXMLHttpRequestProgressEventTable); |
|
127 } |
|
128 const ClassInfo JSXMLHttpRequestProgressEvent::s_info = { "XMLHttpRequestProgressEvent", &JSProgressEvent::s_info, 0, getJSXMLHttpRequestProgressEventTable }; |
|
129 |
|
130 JSXMLHttpRequestProgressEvent::JSXMLHttpRequestProgressEvent(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XMLHttpRequestProgressEvent> impl) |
|
131 : JSProgressEvent(structure, globalObject, impl) |
|
132 { |
|
133 } |
|
134 |
|
135 JSObject* JSXMLHttpRequestProgressEvent::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
136 { |
|
137 return new (exec) JSXMLHttpRequestProgressEventPrototype(globalObject, JSXMLHttpRequestProgressEventPrototype::createStructure(JSProgressEventPrototype::self(exec, globalObject))); |
|
138 } |
|
139 |
|
140 bool JSXMLHttpRequestProgressEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
141 { |
|
142 return getStaticValueSlot<JSXMLHttpRequestProgressEvent, Base>(exec, getJSXMLHttpRequestProgressEventTable(exec), this, propertyName, slot); |
|
143 } |
|
144 |
|
145 bool JSXMLHttpRequestProgressEvent::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
146 { |
|
147 return getStaticValueDescriptor<JSXMLHttpRequestProgressEvent, Base>(exec, getJSXMLHttpRequestProgressEventTable(exec), this, propertyName, descriptor); |
|
148 } |
|
149 |
|
150 JSValue jsXMLHttpRequestProgressEventPosition(ExecState* exec, JSValue slotBase, const Identifier&) |
|
151 { |
|
152 JSXMLHttpRequestProgressEvent* castedThis = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slotBase)); |
|
153 UNUSED_PARAM(exec); |
|
154 XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(castedThis->impl()); |
|
155 JSValue result = jsNumber(exec, imp->position()); |
|
156 return result; |
|
157 } |
|
158 |
|
159 JSValue jsXMLHttpRequestProgressEventTotalSize(ExecState* exec, JSValue slotBase, const Identifier&) |
|
160 { |
|
161 JSXMLHttpRequestProgressEvent* castedThis = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slotBase)); |
|
162 UNUSED_PARAM(exec); |
|
163 XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(castedThis->impl()); |
|
164 JSValue result = jsNumber(exec, imp->totalSize()); |
|
165 return result; |
|
166 } |
|
167 |
|
168 JSValue jsXMLHttpRequestProgressEventConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
169 { |
|
170 JSXMLHttpRequestProgressEvent* domObject = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slotBase)); |
|
171 return JSXMLHttpRequestProgressEvent::getConstructor(exec, domObject->globalObject()); |
|
172 } |
|
173 JSValue JSXMLHttpRequestProgressEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
174 { |
|
175 return getDOMConstructor<JSXMLHttpRequestProgressEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
176 } |
|
177 |
|
178 |
|
179 } |