|
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 |
|
23 #if ENABLE(SVG) |
|
24 |
|
25 #include "JSSVGAnimatedBoolean.h" |
|
26 |
|
27 #include <wtf/GetPtr.h> |
|
28 |
|
29 using namespace JSC; |
|
30 |
|
31 namespace WebCore { |
|
32 |
|
33 ASSERT_CLASS_FITS_IN_CELL(JSSVGAnimatedBoolean); |
|
34 |
|
35 /* Hash table */ |
|
36 #if ENABLE(JIT) |
|
37 #define THUNK_GENERATOR(generator) , generator |
|
38 #else |
|
39 #define THUNK_GENERATOR(generator) |
|
40 #endif |
|
41 |
|
42 static const HashTableValue JSSVGAnimatedBooleanTableValues[4] = |
|
43 { |
|
44 { "baseVal", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimatedBooleanBaseVal), (intptr_t)setJSSVGAnimatedBooleanBaseVal THUNK_GENERATOR(0) }, |
|
45 { "animVal", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimatedBooleanAnimVal), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
46 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimatedBooleanConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
47 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
48 }; |
|
49 |
|
50 #undef THUNK_GENERATOR |
|
51 static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedBooleanTable = { 8, 7, JSSVGAnimatedBooleanTableValues, 0 }; |
|
52 /* Hash table for constructor */ |
|
53 #if ENABLE(JIT) |
|
54 #define THUNK_GENERATOR(generator) , generator |
|
55 #else |
|
56 #define THUNK_GENERATOR(generator) |
|
57 #endif |
|
58 |
|
59 static const HashTableValue JSSVGAnimatedBooleanConstructorTableValues[1] = |
|
60 { |
|
61 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
62 }; |
|
63 |
|
64 #undef THUNK_GENERATOR |
|
65 static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedBooleanConstructorTable = { 1, 0, JSSVGAnimatedBooleanConstructorTableValues, 0 }; |
|
66 class JSSVGAnimatedBooleanConstructor : public DOMConstructorObject { |
|
67 public: |
|
68 JSSVGAnimatedBooleanConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
69 |
|
70 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
71 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
72 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
73 static const JSC::ClassInfo s_info; |
|
74 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
75 { |
|
76 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
77 } |
|
78 protected: |
|
79 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
80 }; |
|
81 |
|
82 const ClassInfo JSSVGAnimatedBooleanConstructor::s_info = { "SVGAnimatedBooleanConstructor", 0, &JSSVGAnimatedBooleanConstructorTable, 0 }; |
|
83 |
|
84 JSSVGAnimatedBooleanConstructor::JSSVGAnimatedBooleanConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
85 : DOMConstructorObject(JSSVGAnimatedBooleanConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
86 { |
|
87 putDirect(exec->propertyNames().prototype, JSSVGAnimatedBooleanPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
88 } |
|
89 |
|
90 bool JSSVGAnimatedBooleanConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
91 { |
|
92 return getStaticValueSlot<JSSVGAnimatedBooleanConstructor, DOMObject>(exec, &JSSVGAnimatedBooleanConstructorTable, this, propertyName, slot); |
|
93 } |
|
94 |
|
95 bool JSSVGAnimatedBooleanConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
96 { |
|
97 return getStaticValueDescriptor<JSSVGAnimatedBooleanConstructor, DOMObject>(exec, &JSSVGAnimatedBooleanConstructorTable, this, propertyName, descriptor); |
|
98 } |
|
99 |
|
100 /* Hash table for prototype */ |
|
101 #if ENABLE(JIT) |
|
102 #define THUNK_GENERATOR(generator) , generator |
|
103 #else |
|
104 #define THUNK_GENERATOR(generator) |
|
105 #endif |
|
106 |
|
107 static const HashTableValue JSSVGAnimatedBooleanPrototypeTableValues[1] = |
|
108 { |
|
109 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
110 }; |
|
111 |
|
112 #undef THUNK_GENERATOR |
|
113 static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedBooleanPrototypeTable = { 1, 0, JSSVGAnimatedBooleanPrototypeTableValues, 0 }; |
|
114 const ClassInfo JSSVGAnimatedBooleanPrototype::s_info = { "SVGAnimatedBooleanPrototype", 0, &JSSVGAnimatedBooleanPrototypeTable, 0 }; |
|
115 |
|
116 JSObject* JSSVGAnimatedBooleanPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
117 { |
|
118 return getDOMPrototype<JSSVGAnimatedBoolean>(exec, globalObject); |
|
119 } |
|
120 |
|
121 const ClassInfo JSSVGAnimatedBoolean::s_info = { "SVGAnimatedBoolean", 0, &JSSVGAnimatedBooleanTable, 0 }; |
|
122 |
|
123 JSSVGAnimatedBoolean::JSSVGAnimatedBoolean(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedBoolean> impl) |
|
124 : DOMObjectWithGlobalPointer(structure, globalObject) |
|
125 , m_impl(impl) |
|
126 { |
|
127 } |
|
128 |
|
129 JSSVGAnimatedBoolean::~JSSVGAnimatedBoolean() |
|
130 { |
|
131 forgetDOMObject(this, impl()); |
|
132 JSSVGContextCache::forgetWrapper(this); |
|
133 } |
|
134 |
|
135 JSObject* JSSVGAnimatedBoolean::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
136 { |
|
137 return new (exec) JSSVGAnimatedBooleanPrototype(globalObject, JSSVGAnimatedBooleanPrototype::createStructure(globalObject->objectPrototype())); |
|
138 } |
|
139 |
|
140 bool JSSVGAnimatedBoolean::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
141 { |
|
142 return getStaticValueSlot<JSSVGAnimatedBoolean, Base>(exec, &JSSVGAnimatedBooleanTable, this, propertyName, slot); |
|
143 } |
|
144 |
|
145 bool JSSVGAnimatedBoolean::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
146 { |
|
147 return getStaticValueDescriptor<JSSVGAnimatedBoolean, Base>(exec, &JSSVGAnimatedBooleanTable, this, propertyName, descriptor); |
|
148 } |
|
149 |
|
150 JSValue jsSVGAnimatedBooleanBaseVal(ExecState* exec, JSValue slotBase, const Identifier&) |
|
151 { |
|
152 JSSVGAnimatedBoolean* castedThis = static_cast<JSSVGAnimatedBoolean*>(asObject(slotBase)); |
|
153 UNUSED_PARAM(exec); |
|
154 SVGAnimatedBoolean* imp = static_cast<SVGAnimatedBoolean*>(castedThis->impl()); |
|
155 JSValue result = jsBoolean(imp->baseVal()); |
|
156 return result; |
|
157 } |
|
158 |
|
159 JSValue jsSVGAnimatedBooleanAnimVal(ExecState* exec, JSValue slotBase, const Identifier&) |
|
160 { |
|
161 JSSVGAnimatedBoolean* castedThis = static_cast<JSSVGAnimatedBoolean*>(asObject(slotBase)); |
|
162 UNUSED_PARAM(exec); |
|
163 SVGAnimatedBoolean* imp = static_cast<SVGAnimatedBoolean*>(castedThis->impl()); |
|
164 JSValue result = jsBoolean(imp->animVal()); |
|
165 return result; |
|
166 } |
|
167 |
|
168 JSValue jsSVGAnimatedBooleanConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
169 { |
|
170 JSSVGAnimatedBoolean* domObject = static_cast<JSSVGAnimatedBoolean*>(asObject(slotBase)); |
|
171 return JSSVGAnimatedBoolean::getConstructor(exec, domObject->globalObject()); |
|
172 } |
|
173 void JSSVGAnimatedBoolean::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) |
|
174 { |
|
175 lookupPut<JSSVGAnimatedBoolean, Base>(exec, propertyName, value, &JSSVGAnimatedBooleanTable, this, slot); |
|
176 } |
|
177 |
|
178 void setJSSVGAnimatedBooleanBaseVal(ExecState* exec, JSObject* thisObject, JSValue value) |
|
179 { |
|
180 JSSVGAnimatedBoolean* castedThis = static_cast<JSSVGAnimatedBoolean*>(thisObject); |
|
181 SVGAnimatedBoolean* imp = static_cast<SVGAnimatedBoolean*>(castedThis->impl()); |
|
182 imp->setBaseVal(value.toBoolean(exec)); |
|
183 JSSVGContextCache::propagateSVGDOMChange(castedThis, imp->associatedAttributeName()); |
|
184 } |
|
185 |
|
186 JSValue JSSVGAnimatedBoolean::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
187 { |
|
188 return getDOMConstructor<JSSVGAnimatedBooleanConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
189 } |
|
190 |
|
191 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedBoolean* object, SVGElement* context) |
|
192 { |
|
193 return getDOMObjectWrapper<JSSVGAnimatedBoolean>(exec, globalObject, object, context); |
|
194 } |
|
195 SVGAnimatedBoolean* toSVGAnimatedBoolean(JSC::JSValue value) |
|
196 { |
|
197 return value.inherits(&JSSVGAnimatedBoolean::s_info) ? static_cast<JSSVGAnimatedBoolean*>(asObject(value))->impl() : 0; |
|
198 } |
|
199 |
|
200 } |
|
201 |
|
202 #endif // ENABLE(SVG) |