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