tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSSVGPolygonElement.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
23 #if ENABLE(SVG)
24
25 #include "JSSVGPolygonElement.h"
26
27 #include "CSSMutableStyleDeclaration.h"
28 #include "CSSStyleDeclaration.h"
29 #include "CSSValue.h"
30 #include "ExceptionCode.h"
31 #include "JSCSSStyleDeclaration.h"
32 #include "JSCSSValue.h"
33 #include "JSDOMBinding.h"
34 #include "JSSVGAnimatedBoolean.h"
35 #include "JSSVGAnimatedString.h"
36 #include "JSSVGAnimatedTransformList.h"
37 #include "JSSVGElement.h"
38 #include "JSSVGMatrix.h"
39 #include "JSSVGPointList.h"
40 #include "JSSVGRect.h"
41 #include "JSSVGStringList.h"
42 #include "KURL.h"
43 #include "SVGElement.h"
44 #include "SVGMatrix.h"
45 #include "SVGPointList.h"
46 #include "SVGPolygonElement.h"
47 #include "SVGRect.h"
48 #include "SVGStringList.h"
49 #include <runtime/Error.h>
50 #include <runtime/JSString.h>
51 #include <wtf/GetPtr.h>
52
53 using namespace JSC;
54
55 namespace WebCore {
56
57 ASSERT_CLASS_FITS_IN_CELL(JSSVGPolygonElement);
58
59 /* Hash table */
60 #if ENABLE(JIT)
61 #define THUNK_GENERATOR(generator) , generator
62 #else
63 #define THUNK_GENERATOR(generator)
64 #endif
65 #if ENABLE(DFG_JIT)
66 #define INTRINSIC(intrinsic) , intrinsic
67 #else
68 #define INTRINSIC(intrinsic)
69 #endif
70
71 static const HashTableValue JSSVGPolygonElementTableValues[] =
72 {
73     { "points", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementPoints), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
74     { "animatedPoints", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementAnimatedPoints), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
75     { "requiredFeatures", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementRequiredFeatures), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
76     { "requiredExtensions", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementRequiredExtensions), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
77     { "systemLanguage", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementSystemLanguage), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
78     { "xmllang", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementXmllang), (intptr_t)setJSSVGPolygonElementXmllang THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
79     { "xmlspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementXmlspace), (intptr_t)setJSSVGPolygonElementXmlspace THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
80     { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
81     { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementClassName), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
82     { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementStyle), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
83     { "transform", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementTransform), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
84     { "nearestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementNearestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
85     { "farthestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementFarthestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
86     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPolygonElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
87     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
88 };
89
90 #undef THUNK_GENERATOR
91 static const HashTable JSSVGPolygonElementTable = { 34, 31, JSSVGPolygonElementTableValues, 0 };
92 /* Hash table for constructor */
93 #if ENABLE(JIT)
94 #define THUNK_GENERATOR(generator) , generator
95 #else
96 #define THUNK_GENERATOR(generator)
97 #endif
98 #if ENABLE(DFG_JIT)
99 #define INTRINSIC(intrinsic) , intrinsic
100 #else
101 #define INTRINSIC(intrinsic)
102 #endif
103
104 static const HashTableValue JSSVGPolygonElementConstructorTableValues[] =
105 {
106     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
107 };
108
109 #undef THUNK_GENERATOR
110 static const HashTable JSSVGPolygonElementConstructorTable = { 1, 0, JSSVGPolygonElementConstructorTableValues, 0 };
111 const ClassInfo JSSVGPolygonElementConstructor::s_info = { "SVGPolygonElementConstructor", &DOMConstructorObject::s_info, &JSSVGPolygonElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGPolygonElementConstructor) };
112
113 JSSVGPolygonElementConstructor::JSSVGPolygonElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
114     : DOMConstructorObject(structure, globalObject)
115 {
116 }
117
118 void JSSVGPolygonElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
119 {
120     Base::finishCreation(exec->globalData());
121     ASSERT(inherits(&s_info));
122     putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGPolygonElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
123 }
124
125 bool JSSVGPolygonElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
126 {
127     return getStaticValueSlot<JSSVGPolygonElementConstructor, JSDOMWrapper>(exec, &JSSVGPolygonElementConstructorTable, static_cast<JSSVGPolygonElementConstructor*>(cell), propertyName, slot);
128 }
129
130 bool JSSVGPolygonElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
131 {
132     return getStaticValueDescriptor<JSSVGPolygonElementConstructor, JSDOMWrapper>(exec, &JSSVGPolygonElementConstructorTable, static_cast<JSSVGPolygonElementConstructor*>(object), propertyName, descriptor);
133 }
134
135 /* Hash table for prototype */
136 #if ENABLE(JIT)
137 #define THUNK_GENERATOR(generator) , generator
138 #else
139 #define THUNK_GENERATOR(generator)
140 #endif
141 #if ENABLE(DFG_JIT)
142 #define INTRINSIC(intrinsic) , intrinsic
143 #else
144 #define INTRINSIC(intrinsic)
145 #endif
146
147 static const HashTableValue JSSVGPolygonElementPrototypeTableValues[] =
148 {
149     { "hasExtension", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGPolygonElementPrototypeFunctionHasExtension), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
150     { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGPolygonElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
151     { "getBBox", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGPolygonElementPrototypeFunctionGetBBox), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
152     { "getCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGPolygonElementPrototypeFunctionGetCTM), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
153     { "getScreenCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGPolygonElementPrototypeFunctionGetScreenCTM), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
154     { "getTransformToElement", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGPolygonElementPrototypeFunctionGetTransformToElement), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
155     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
156 };
157
158 #undef THUNK_GENERATOR
159 static const HashTable JSSVGPolygonElementPrototypeTable = { 17, 15, JSSVGPolygonElementPrototypeTableValues, 0 };
160 const ClassInfo JSSVGPolygonElementPrototype::s_info = { "SVGPolygonElementPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGPolygonElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGPolygonElementPrototype) };
161
162 JSObject* JSSVGPolygonElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
163 {
164     return getDOMPrototype<JSSVGPolygonElement>(exec, globalObject);
165 }
166
167 bool JSSVGPolygonElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
168 {
169     JSSVGPolygonElementPrototype* thisObject = jsCast<JSSVGPolygonElementPrototype*>(cell);
170     return getStaticFunctionSlot<JSObject>(exec, &JSSVGPolygonElementPrototypeTable, thisObject, propertyName, slot);
171 }
172
173 bool JSSVGPolygonElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
174 {
175     JSSVGPolygonElementPrototype* thisObject = jsCast<JSSVGPolygonElementPrototype*>(object);
176     return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGPolygonElementPrototypeTable, thisObject, propertyName, descriptor);
177 }
178
179 const ClassInfo JSSVGPolygonElement::s_info = { "SVGPolygonElement", &JSSVGElement::s_info, &JSSVGPolygonElementTable, 0 , CREATE_METHOD_TABLE(JSSVGPolygonElement) };
180
181 JSSVGPolygonElement::JSSVGPolygonElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPolygonElement> impl)
182     : JSSVGElement(structure, globalObject, impl)
183 {
184 }
185
186 void JSSVGPolygonElement::finishCreation(JSGlobalData& globalData)
187 {
188     Base::finishCreation(globalData);
189     ASSERT(inherits(&s_info));
190 }
191
192 JSObject* JSSVGPolygonElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
193 {
194     return JSSVGPolygonElementPrototype::create(exec->globalData(), globalObject, JSSVGPolygonElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
195 }
196
197 bool JSSVGPolygonElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
198 {
199     JSSVGPolygonElement* thisObject = jsCast<JSSVGPolygonElement*>(cell);
200     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
201     return getStaticValueSlot<JSSVGPolygonElement, Base>(exec, &JSSVGPolygonElementTable, thisObject, propertyName, slot);
202 }
203
204 bool JSSVGPolygonElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
205 {
206     JSSVGPolygonElement* thisObject = jsCast<JSSVGPolygonElement*>(object);
207     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
208     return getStaticValueDescriptor<JSSVGPolygonElement, Base>(exec, &JSSVGPolygonElementTable, thisObject, propertyName, descriptor);
209 }
210
211 JSValue jsSVGPolygonElementPoints(ExecState* exec, JSValue slotBase, const Identifier&)
212 {
213     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
214     UNUSED_PARAM(exec);
215     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
216     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->points()));
217     return result;
218 }
219
220
221 JSValue jsSVGPolygonElementAnimatedPoints(ExecState* exec, JSValue slotBase, const Identifier&)
222 {
223     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
224     UNUSED_PARAM(exec);
225     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
226     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->animatedPoints()));
227     return result;
228 }
229
230
231 JSValue jsSVGPolygonElementRequiredFeatures(ExecState* exec, JSValue slotBase, const Identifier&)
232 {
233     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
234     UNUSED_PARAM(exec);
235     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
236     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->requiredFeatures())));
237     return result;
238 }
239
240
241 JSValue jsSVGPolygonElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&)
242 {
243     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
244     UNUSED_PARAM(exec);
245     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
246     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->requiredExtensions())));
247     return result;
248 }
249
250
251 JSValue jsSVGPolygonElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&)
252 {
253     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
254     UNUSED_PARAM(exec);
255     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
256     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->systemLanguage())));
257     return result;
258 }
259
260
261 JSValue jsSVGPolygonElementXmllang(ExecState* exec, JSValue slotBase, const Identifier&)
262 {
263     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
264     UNUSED_PARAM(exec);
265     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
266     JSValue result = jsString(exec, imp->xmllang());
267     return result;
268 }
269
270
271 JSValue jsSVGPolygonElementXmlspace(ExecState* exec, JSValue slotBase, const Identifier&)
272 {
273     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
274     UNUSED_PARAM(exec);
275     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
276     JSValue result = jsString(exec, imp->xmlspace());
277     return result;
278 }
279
280
281 JSValue jsSVGPolygonElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&)
282 {
283     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
284     UNUSED_PARAM(exec);
285     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
286     RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
287     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
288     return result;
289 }
290
291
292 JSValue jsSVGPolygonElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
293 {
294     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
295     UNUSED_PARAM(exec);
296     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
297     RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
298     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
299     return result;
300 }
301
302
303 JSValue jsSVGPolygonElementStyle(ExecState* exec, JSValue slotBase, const Identifier&)
304 {
305     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
306     UNUSED_PARAM(exec);
307     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
308     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
309     return result;
310 }
311
312
313 JSValue jsSVGPolygonElementTransform(ExecState* exec, JSValue slotBase, const Identifier&)
314 {
315     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
316     UNUSED_PARAM(exec);
317     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
318     RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated();
319     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
320     return result;
321 }
322
323
324 JSValue jsSVGPolygonElementNearestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&)
325 {
326     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
327     UNUSED_PARAM(exec);
328     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
329     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement()));
330     return result;
331 }
332
333
334 JSValue jsSVGPolygonElementFarthestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&)
335 {
336     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
337     UNUSED_PARAM(exec);
338     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
339     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement()));
340     return result;
341 }
342
343
344 JSValue jsSVGPolygonElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
345 {
346     JSSVGPolygonElement* domObject = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
347     return JSSVGPolygonElement::getConstructor(exec, domObject->globalObject());
348 }
349
350 void JSSVGPolygonElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
351 {
352     JSSVGPolygonElement* thisObject = jsCast<JSSVGPolygonElement*>(cell);
353     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
354     lookupPut<JSSVGPolygonElement, Base>(exec, propertyName, value, &JSSVGPolygonElementTable, thisObject, slot);
355 }
356
357 void setJSSVGPolygonElementXmllang(ExecState* exec, JSObject* thisObject, JSValue value)
358 {
359     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(thisObject);
360     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
361     imp->setXmllang(ustringToString(value.isEmpty() ? UString() : value.toString(exec)));
362 }
363
364
365 void setJSSVGPolygonElementXmlspace(ExecState* exec, JSObject* thisObject, JSValue value)
366 {
367     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(thisObject);
368     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
369     imp->setXmlspace(ustringToString(value.isEmpty() ? UString() : value.toString(exec)));
370 }
371
372
373 JSValue JSSVGPolygonElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
374 {
375     return getDOMConstructor<JSSVGPolygonElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
376 }
377
378 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionHasExtension(ExecState* exec)
379 {
380     JSValue thisValue = exec->hostThisValue();
381     if (!thisValue.inherits(&JSSVGPolygonElement::s_info))
382         return throwVMTypeError(exec);
383     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
384     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGPolygonElement::s_info);
385     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
386     const String& extension(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
387     if (exec->hadException())
388         return JSValue::encode(jsUndefined());
389
390     JSC::JSValue result = jsBoolean(imp->hasExtension(extension));
391     return JSValue::encode(result);
392 }
393
394 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetPresentationAttribute(ExecState* exec)
395 {
396     JSValue thisValue = exec->hostThisValue();
397     if (!thisValue.inherits(&JSSVGPolygonElement::s_info))
398         return throwVMTypeError(exec);
399     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
400     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGPolygonElement::s_info);
401     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
402     const String& name(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
403     if (exec->hadException())
404         return JSValue::encode(jsUndefined());
405
406     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
407     return JSValue::encode(result);
408 }
409
410 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetBBox(ExecState* exec)
411 {
412     JSValue thisValue = exec->hostThisValue();
413     if (!thisValue.inherits(&JSSVGPolygonElement::s_info))
414         return throwVMTypeError(exec);
415     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
416     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGPolygonElement::s_info);
417     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
418
419     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<FloatRect>::create(imp->getBBox())));
420     return JSValue::encode(result);
421 }
422
423 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetCTM(ExecState* exec)
424 {
425     JSValue thisValue = exec->hostThisValue();
426     if (!thisValue.inherits(&JSSVGPolygonElement::s_info))
427         return throwVMTypeError(exec);
428     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
429     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGPolygonElement::s_info);
430     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
431
432     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGMatrix>::create(imp->getCTM())));
433     return JSValue::encode(result);
434 }
435
436 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetScreenCTM(ExecState* exec)
437 {
438     JSValue thisValue = exec->hostThisValue();
439     if (!thisValue.inherits(&JSSVGPolygonElement::s_info))
440         return throwVMTypeError(exec);
441     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
442     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGPolygonElement::s_info);
443     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
444
445     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGMatrix>::create(imp->getScreenCTM())));
446     return JSValue::encode(result);
447 }
448
449 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetTransformToElement(ExecState* exec)
450 {
451     JSValue thisValue = exec->hostThisValue();
452     if (!thisValue.inherits(&JSSVGPolygonElement::s_info))
453         return throwVMTypeError(exec);
454     JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
455     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGPolygonElement::s_info);
456     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
457     ExceptionCode ec = 0;
458     SVGElement* element(toSVGElement(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
459     if (exec->hadException())
460         return JSValue::encode(jsUndefined());
461
462     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGMatrix>::create(imp->getTransformToElement(element, ec))));
463     setDOMException(exec, ec);
464     return JSValue::encode(result);
465 }
466
467
468 }
469
470 #endif // ENABLE(SVG)