|
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 "JSSVGCircleElement.h" |
|
26 |
|
27 #include "CSSMutableStyleDeclaration.h" |
|
28 #include "CSSStyleDeclaration.h" |
|
29 #include "CSSValue.h" |
|
30 #include "JSCSSStyleDeclaration.h" |
|
31 #include "JSCSSValue.h" |
|
32 #include "JSSVGAnimatedBoolean.h" |
|
33 #include "JSSVGAnimatedLength.h" |
|
34 #include "JSSVGAnimatedString.h" |
|
35 #include "JSSVGAnimatedTransformList.h" |
|
36 #include "JSSVGElement.h" |
|
37 #include "JSSVGMatrix.h" |
|
38 #include "JSSVGRect.h" |
|
39 #include "JSSVGStringList.h" |
|
40 #include "KURL.h" |
|
41 #include "SVGCircleElement.h" |
|
42 #include "SVGElement.h" |
|
43 #include "SVGStringList.h" |
|
44 #include <runtime/Error.h> |
|
45 #include <runtime/JSString.h> |
|
46 #include <wtf/GetPtr.h> |
|
47 |
|
48 using namespace JSC; |
|
49 |
|
50 namespace WebCore { |
|
51 |
|
52 ASSERT_CLASS_FITS_IN_CELL(JSSVGCircleElement); |
|
53 |
|
54 /* Hash table */ |
|
55 #if ENABLE(JIT) |
|
56 #define THUNK_GENERATOR(generator) , generator |
|
57 #else |
|
58 #define THUNK_GENERATOR(generator) |
|
59 #endif |
|
60 |
|
61 static const HashTableValue JSSVGCircleElementTableValues[16] = |
|
62 { |
|
63 { "cx", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementCx), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
64 { "cy", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementCy), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
65 { "r", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementR), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
66 { "requiredFeatures", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementRequiredFeatures), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
67 { "requiredExtensions", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementRequiredExtensions), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
68 { "systemLanguage", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementSystemLanguage), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
69 { "xmllang", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementXmllang), (intptr_t)setJSSVGCircleElementXmllang THUNK_GENERATOR(0) }, |
|
70 { "xmlspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementXmlspace), (intptr_t)setJSSVGCircleElementXmlspace THUNK_GENERATOR(0) }, |
|
71 { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
72 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementClassName), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
73 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementStyle), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
74 { "transform", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementTransform), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
75 { "nearestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementNearestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
76 { "farthestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementFarthestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
77 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCircleElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
78 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
79 }; |
|
80 |
|
81 #undef THUNK_GENERATOR |
|
82 static JSC_CONST_HASHTABLE HashTable JSSVGCircleElementTable = { 35, 31, JSSVGCircleElementTableValues, 0 }; |
|
83 /* Hash table for constructor */ |
|
84 #if ENABLE(JIT) |
|
85 #define THUNK_GENERATOR(generator) , generator |
|
86 #else |
|
87 #define THUNK_GENERATOR(generator) |
|
88 #endif |
|
89 |
|
90 static const HashTableValue JSSVGCircleElementConstructorTableValues[1] = |
|
91 { |
|
92 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
93 }; |
|
94 |
|
95 #undef THUNK_GENERATOR |
|
96 static JSC_CONST_HASHTABLE HashTable JSSVGCircleElementConstructorTable = { 1, 0, JSSVGCircleElementConstructorTableValues, 0 }; |
|
97 class JSSVGCircleElementConstructor : public DOMConstructorObject { |
|
98 public: |
|
99 JSSVGCircleElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
100 |
|
101 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
102 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
103 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
104 static const JSC::ClassInfo s_info; |
|
105 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
106 { |
|
107 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
108 } |
|
109 protected: |
|
110 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
111 }; |
|
112 |
|
113 const ClassInfo JSSVGCircleElementConstructor::s_info = { "SVGCircleElementConstructor", 0, &JSSVGCircleElementConstructorTable, 0 }; |
|
114 |
|
115 JSSVGCircleElementConstructor::JSSVGCircleElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
116 : DOMConstructorObject(JSSVGCircleElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
117 { |
|
118 putDirect(exec->propertyNames().prototype, JSSVGCircleElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
119 } |
|
120 |
|
121 bool JSSVGCircleElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
122 { |
|
123 return getStaticValueSlot<JSSVGCircleElementConstructor, DOMObject>(exec, &JSSVGCircleElementConstructorTable, this, propertyName, slot); |
|
124 } |
|
125 |
|
126 bool JSSVGCircleElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
127 { |
|
128 return getStaticValueDescriptor<JSSVGCircleElementConstructor, DOMObject>(exec, &JSSVGCircleElementConstructorTable, this, propertyName, descriptor); |
|
129 } |
|
130 |
|
131 /* Hash table for prototype */ |
|
132 #if ENABLE(JIT) |
|
133 #define THUNK_GENERATOR(generator) , generator |
|
134 #else |
|
135 #define THUNK_GENERATOR(generator) |
|
136 #endif |
|
137 |
|
138 static const HashTableValue JSSVGCircleElementPrototypeTableValues[7] = |
|
139 { |
|
140 { "hasExtension", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGCircleElementPrototypeFunctionHasExtension), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
141 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGCircleElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
142 { "getBBox", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGCircleElementPrototypeFunctionGetBBox), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
143 { "getCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGCircleElementPrototypeFunctionGetCTM), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
144 { "getScreenCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGCircleElementPrototypeFunctionGetScreenCTM), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
145 { "getTransformToElement", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGCircleElementPrototypeFunctionGetTransformToElement), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
146 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
147 }; |
|
148 |
|
149 #undef THUNK_GENERATOR |
|
150 static JSC_CONST_HASHTABLE HashTable JSSVGCircleElementPrototypeTable = { 17, 15, JSSVGCircleElementPrototypeTableValues, 0 }; |
|
151 const ClassInfo JSSVGCircleElementPrototype::s_info = { "SVGCircleElementPrototype", 0, &JSSVGCircleElementPrototypeTable, 0 }; |
|
152 |
|
153 JSObject* JSSVGCircleElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
154 { |
|
155 return getDOMPrototype<JSSVGCircleElement>(exec, globalObject); |
|
156 } |
|
157 |
|
158 bool JSSVGCircleElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
159 { |
|
160 return getStaticFunctionSlot<JSObject>(exec, &JSSVGCircleElementPrototypeTable, this, propertyName, slot); |
|
161 } |
|
162 |
|
163 bool JSSVGCircleElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
164 { |
|
165 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGCircleElementPrototypeTable, this, propertyName, descriptor); |
|
166 } |
|
167 |
|
168 const ClassInfo JSSVGCircleElement::s_info = { "SVGCircleElement", &JSSVGElement::s_info, &JSSVGCircleElementTable, 0 }; |
|
169 |
|
170 JSSVGCircleElement::JSSVGCircleElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGCircleElement> impl) |
|
171 : JSSVGElement(structure, globalObject, impl) |
|
172 { |
|
173 } |
|
174 |
|
175 JSObject* JSSVGCircleElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
176 { |
|
177 return new (exec) JSSVGCircleElementPrototype(globalObject, JSSVGCircleElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); |
|
178 } |
|
179 |
|
180 bool JSSVGCircleElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
181 { |
|
182 return getStaticValueSlot<JSSVGCircleElement, Base>(exec, &JSSVGCircleElementTable, this, propertyName, slot); |
|
183 } |
|
184 |
|
185 bool JSSVGCircleElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
186 { |
|
187 return getStaticValueDescriptor<JSSVGCircleElement, Base>(exec, &JSSVGCircleElementTable, this, propertyName, descriptor); |
|
188 } |
|
189 |
|
190 JSValue jsSVGCircleElementCx(ExecState* exec, JSValue slotBase, const Identifier&) |
|
191 { |
|
192 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
193 UNUSED_PARAM(exec); |
|
194 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
195 RefPtr<SVGAnimatedLength> obj = imp->cxAnimated(); |
|
196 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
197 return result; |
|
198 } |
|
199 |
|
200 JSValue jsSVGCircleElementCy(ExecState* exec, JSValue slotBase, const Identifier&) |
|
201 { |
|
202 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
203 UNUSED_PARAM(exec); |
|
204 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
205 RefPtr<SVGAnimatedLength> obj = imp->cyAnimated(); |
|
206 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
207 return result; |
|
208 } |
|
209 |
|
210 JSValue jsSVGCircleElementR(ExecState* exec, JSValue slotBase, const Identifier&) |
|
211 { |
|
212 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
213 UNUSED_PARAM(exec); |
|
214 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
215 RefPtr<SVGAnimatedLength> obj = imp->rAnimated(); |
|
216 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
217 return result; |
|
218 } |
|
219 |
|
220 JSValue jsSVGCircleElementRequiredFeatures(ExecState* exec, JSValue slotBase, const Identifier&) |
|
221 { |
|
222 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
223 UNUSED_PARAM(exec); |
|
224 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
225 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); |
|
226 return result; |
|
227 } |
|
228 |
|
229 JSValue jsSVGCircleElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&) |
|
230 { |
|
231 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
232 UNUSED_PARAM(exec); |
|
233 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
234 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); |
|
235 return result; |
|
236 } |
|
237 |
|
238 JSValue jsSVGCircleElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&) |
|
239 { |
|
240 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
241 UNUSED_PARAM(exec); |
|
242 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
243 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); |
|
244 return result; |
|
245 } |
|
246 |
|
247 JSValue jsSVGCircleElementXmllang(ExecState* exec, JSValue slotBase, const Identifier&) |
|
248 { |
|
249 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
250 UNUSED_PARAM(exec); |
|
251 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
252 JSValue result = jsString(exec, imp->xmllang()); |
|
253 return result; |
|
254 } |
|
255 |
|
256 JSValue jsSVGCircleElementXmlspace(ExecState* exec, JSValue slotBase, const Identifier&) |
|
257 { |
|
258 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
259 UNUSED_PARAM(exec); |
|
260 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
261 JSValue result = jsString(exec, imp->xmlspace()); |
|
262 return result; |
|
263 } |
|
264 |
|
265 JSValue jsSVGCircleElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&) |
|
266 { |
|
267 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
268 UNUSED_PARAM(exec); |
|
269 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
270 RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); |
|
271 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
272 return result; |
|
273 } |
|
274 |
|
275 JSValue jsSVGCircleElementClassName(ExecState* exec, JSValue slotBase, const Identifier&) |
|
276 { |
|
277 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
278 UNUSED_PARAM(exec); |
|
279 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
280 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); |
|
281 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
282 return result; |
|
283 } |
|
284 |
|
285 JSValue jsSVGCircleElementStyle(ExecState* exec, JSValue slotBase, const Identifier&) |
|
286 { |
|
287 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
288 UNUSED_PARAM(exec); |
|
289 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
290 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); |
|
291 return result; |
|
292 } |
|
293 |
|
294 JSValue jsSVGCircleElementTransform(ExecState* exec, JSValue slotBase, const Identifier&) |
|
295 { |
|
296 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
297 UNUSED_PARAM(exec); |
|
298 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
299 RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); |
|
300 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
301 return result; |
|
302 } |
|
303 |
|
304 JSValue jsSVGCircleElementNearestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&) |
|
305 { |
|
306 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
307 UNUSED_PARAM(exec); |
|
308 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
309 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); |
|
310 return result; |
|
311 } |
|
312 |
|
313 JSValue jsSVGCircleElementFarthestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&) |
|
314 { |
|
315 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
316 UNUSED_PARAM(exec); |
|
317 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
318 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); |
|
319 return result; |
|
320 } |
|
321 |
|
322 JSValue jsSVGCircleElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
323 { |
|
324 JSSVGCircleElement* domObject = static_cast<JSSVGCircleElement*>(asObject(slotBase)); |
|
325 return JSSVGCircleElement::getConstructor(exec, domObject->globalObject()); |
|
326 } |
|
327 void JSSVGCircleElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) |
|
328 { |
|
329 lookupPut<JSSVGCircleElement, Base>(exec, propertyName, value, &JSSVGCircleElementTable, this, slot); |
|
330 } |
|
331 |
|
332 void setJSSVGCircleElementXmllang(ExecState* exec, JSObject* thisObject, JSValue value) |
|
333 { |
|
334 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(thisObject); |
|
335 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
336 imp->setXmllang(ustringToString(value.toString(exec))); |
|
337 } |
|
338 |
|
339 void setJSSVGCircleElementXmlspace(ExecState* exec, JSObject* thisObject, JSValue value) |
|
340 { |
|
341 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(thisObject); |
|
342 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
343 imp->setXmlspace(ustringToString(value.toString(exec))); |
|
344 } |
|
345 |
|
346 JSValue JSSVGCircleElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
347 { |
|
348 return getDOMConstructor<JSSVGCircleElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
349 } |
|
350 |
|
351 EncodedJSValue JSC_HOST_CALL jsSVGCircleElementPrototypeFunctionHasExtension(ExecState* exec) |
|
352 { |
|
353 JSValue thisValue = exec->hostThisValue(); |
|
354 if (!thisValue.inherits(&JSSVGCircleElement::s_info)) |
|
355 return throwVMTypeError(exec); |
|
356 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(thisValue)); |
|
357 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
358 const String& extension = ustringToString(exec->argument(0).toString(exec)); |
|
359 |
|
360 |
|
361 JSC::JSValue result = jsBoolean(imp->hasExtension(extension)); |
|
362 return JSValue::encode(result); |
|
363 } |
|
364 |
|
365 EncodedJSValue JSC_HOST_CALL jsSVGCircleElementPrototypeFunctionGetPresentationAttribute(ExecState* exec) |
|
366 { |
|
367 JSValue thisValue = exec->hostThisValue(); |
|
368 if (!thisValue.inherits(&JSSVGCircleElement::s_info)) |
|
369 return throwVMTypeError(exec); |
|
370 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(thisValue)); |
|
371 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
372 const String& name = ustringToString(exec->argument(0).toString(exec)); |
|
373 |
|
374 |
|
375 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); |
|
376 return JSValue::encode(result); |
|
377 } |
|
378 |
|
379 EncodedJSValue JSC_HOST_CALL jsSVGCircleElementPrototypeFunctionGetBBox(ExecState* exec) |
|
380 { |
|
381 JSValue thisValue = exec->hostThisValue(); |
|
382 if (!thisValue.inherits(&JSSVGCircleElement::s_info)) |
|
383 return throwVMTypeError(exec); |
|
384 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(thisValue)); |
|
385 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
386 |
|
387 |
|
388 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), 0 /* no context on purpose */); |
|
389 return JSValue::encode(result); |
|
390 } |
|
391 |
|
392 EncodedJSValue JSC_HOST_CALL jsSVGCircleElementPrototypeFunctionGetCTM(ExecState* exec) |
|
393 { |
|
394 JSValue thisValue = exec->hostThisValue(); |
|
395 if (!thisValue.inherits(&JSSVGCircleElement::s_info)) |
|
396 return throwVMTypeError(exec); |
|
397 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(thisValue)); |
|
398 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
399 |
|
400 |
|
401 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getCTM()).get(), 0 /* no context on purpose */); |
|
402 return JSValue::encode(result); |
|
403 } |
|
404 |
|
405 EncodedJSValue JSC_HOST_CALL jsSVGCircleElementPrototypeFunctionGetScreenCTM(ExecState* exec) |
|
406 { |
|
407 JSValue thisValue = exec->hostThisValue(); |
|
408 if (!thisValue.inherits(&JSSVGCircleElement::s_info)) |
|
409 return throwVMTypeError(exec); |
|
410 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(thisValue)); |
|
411 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
412 |
|
413 |
|
414 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getScreenCTM()).get(), 0 /* no context on purpose */); |
|
415 return JSValue::encode(result); |
|
416 } |
|
417 |
|
418 EncodedJSValue JSC_HOST_CALL jsSVGCircleElementPrototypeFunctionGetTransformToElement(ExecState* exec) |
|
419 { |
|
420 JSValue thisValue = exec->hostThisValue(); |
|
421 if (!thisValue.inherits(&JSSVGCircleElement::s_info)) |
|
422 return throwVMTypeError(exec); |
|
423 JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(thisValue)); |
|
424 SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); |
|
425 ExceptionCode ec = 0; |
|
426 SVGElement* element = toSVGElement(exec->argument(0)); |
|
427 |
|
428 |
|
429 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getTransformToElement(element, ec)).get(), 0 /* no context on purpose */); |
|
430 setDOMException(exec, ec); |
|
431 return JSValue::encode(result); |
|
432 } |
|
433 |
|
434 |
|
435 } |
|
436 |
|
437 #endif // ENABLE(SVG) |