2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
25 #include "JSSVGPolygonElement.h"
27 #include "CSSMutableStyleDeclaration.h"
28 #include "CSSStyleDeclaration.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"
43 #include "SVGElement.h"
44 #include "SVGMatrix.h"
45 #include "SVGPointList.h"
46 #include "SVGPolygonElement.h"
48 #include "SVGStringList.h"
49 #include <runtime/Error.h>
50 #include <runtime/JSString.h>
51 #include <wtf/GetPtr.h>
57 ASSERT_CLASS_FITS_IN_CELL(JSSVGPolygonElement);
61 #define THUNK_GENERATOR(generator) , generator
63 #define THUNK_GENERATOR(generator)
66 #define INTRINSIC(intrinsic) , intrinsic
68 #define INTRINSIC(intrinsic)
71 static const HashTableValue JSSVGPolygonElementTableValues[] =
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) }
90 #undef THUNK_GENERATOR
91 static const HashTable JSSVGPolygonElementTable = { 34, 31, JSSVGPolygonElementTableValues, 0 };
92 /* Hash table for constructor */
94 #define THUNK_GENERATOR(generator) , generator
96 #define THUNK_GENERATOR(generator)
99 #define INTRINSIC(intrinsic) , intrinsic
101 #define INTRINSIC(intrinsic)
104 static const HashTableValue JSSVGPolygonElementConstructorTableValues[] =
106 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
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) };
113 JSSVGPolygonElementConstructor::JSSVGPolygonElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
114 : DOMConstructorObject(structure, globalObject)
118 void JSSVGPolygonElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
120 Base::finishCreation(exec->globalData());
121 ASSERT(inherits(&s_info));
122 putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGPolygonElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
125 bool JSSVGPolygonElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
127 return getStaticValueSlot<JSSVGPolygonElementConstructor, JSDOMWrapper>(exec, &JSSVGPolygonElementConstructorTable, static_cast<JSSVGPolygonElementConstructor*>(cell), propertyName, slot);
130 bool JSSVGPolygonElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
132 return getStaticValueDescriptor<JSSVGPolygonElementConstructor, JSDOMWrapper>(exec, &JSSVGPolygonElementConstructorTable, static_cast<JSSVGPolygonElementConstructor*>(object), propertyName, descriptor);
135 /* Hash table for prototype */
137 #define THUNK_GENERATOR(generator) , generator
139 #define THUNK_GENERATOR(generator)
142 #define INTRINSIC(intrinsic) , intrinsic
144 #define INTRINSIC(intrinsic)
147 static const HashTableValue JSSVGPolygonElementPrototypeTableValues[] =
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) }
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) };
162 JSObject* JSSVGPolygonElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
164 return getDOMPrototype<JSSVGPolygonElement>(exec, globalObject);
167 bool JSSVGPolygonElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
169 JSSVGPolygonElementPrototype* thisObject = jsCast<JSSVGPolygonElementPrototype*>(cell);
170 return getStaticFunctionSlot<JSObject>(exec, &JSSVGPolygonElementPrototypeTable, thisObject, propertyName, slot);
173 bool JSSVGPolygonElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
175 JSSVGPolygonElementPrototype* thisObject = jsCast<JSSVGPolygonElementPrototype*>(object);
176 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGPolygonElementPrototypeTable, thisObject, propertyName, descriptor);
179 const ClassInfo JSSVGPolygonElement::s_info = { "SVGPolygonElement", &JSSVGElement::s_info, &JSSVGPolygonElementTable, 0 , CREATE_METHOD_TABLE(JSSVGPolygonElement) };
181 JSSVGPolygonElement::JSSVGPolygonElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPolygonElement> impl)
182 : JSSVGElement(structure, globalObject, impl)
186 void JSSVGPolygonElement::finishCreation(JSGlobalData& globalData)
188 Base::finishCreation(globalData);
189 ASSERT(inherits(&s_info));
192 JSObject* JSSVGPolygonElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
194 return JSSVGPolygonElementPrototype::create(exec->globalData(), globalObject, JSSVGPolygonElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
197 bool JSSVGPolygonElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
199 JSSVGPolygonElement* thisObject = jsCast<JSSVGPolygonElement*>(cell);
200 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
201 return getStaticValueSlot<JSSVGPolygonElement, Base>(exec, &JSSVGPolygonElementTable, thisObject, propertyName, slot);
204 bool JSSVGPolygonElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
206 JSSVGPolygonElement* thisObject = jsCast<JSSVGPolygonElement*>(object);
207 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
208 return getStaticValueDescriptor<JSSVGPolygonElement, Base>(exec, &JSSVGPolygonElementTable, thisObject, propertyName, descriptor);
211 JSValue jsSVGPolygonElementPoints(ExecState* exec, JSValue slotBase, const Identifier&)
213 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
215 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
216 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->points()));
221 JSValue jsSVGPolygonElementAnimatedPoints(ExecState* exec, JSValue slotBase, const Identifier&)
223 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
225 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
226 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->animatedPoints()));
231 JSValue jsSVGPolygonElementRequiredFeatures(ExecState* exec, JSValue slotBase, const Identifier&)
233 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
235 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
236 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->requiredFeatures())));
241 JSValue jsSVGPolygonElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&)
243 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
245 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
246 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->requiredExtensions())));
251 JSValue jsSVGPolygonElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&)
253 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
255 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
256 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->systemLanguage())));
261 JSValue jsSVGPolygonElementXmllang(ExecState* exec, JSValue slotBase, const Identifier&)
263 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
265 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
266 JSValue result = jsString(exec, imp->xmllang());
271 JSValue jsSVGPolygonElementXmlspace(ExecState* exec, JSValue slotBase, const Identifier&)
273 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
275 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
276 JSValue result = jsString(exec, imp->xmlspace());
281 JSValue jsSVGPolygonElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&)
283 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
285 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
286 RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
287 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
292 JSValue jsSVGPolygonElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
294 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
296 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
297 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
298 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
303 JSValue jsSVGPolygonElementStyle(ExecState* exec, JSValue slotBase, const Identifier&)
305 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
307 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
308 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
313 JSValue jsSVGPolygonElementTransform(ExecState* exec, JSValue slotBase, const Identifier&)
315 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
317 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
318 RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated();
319 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
324 JSValue jsSVGPolygonElementNearestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&)
326 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
328 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
329 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement()));
334 JSValue jsSVGPolygonElementFarthestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&)
336 JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
338 SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl());
339 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement()));
344 JSValue jsSVGPolygonElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
346 JSSVGPolygonElement* domObject = static_cast<JSSVGPolygonElement*>(asObject(slotBase));
347 return JSSVGPolygonElement::getConstructor(exec, domObject->globalObject());
350 void JSSVGPolygonElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
352 JSSVGPolygonElement* thisObject = jsCast<JSSVGPolygonElement*>(cell);
353 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
354 lookupPut<JSSVGPolygonElement, Base>(exec, propertyName, value, &JSSVGPolygonElementTable, thisObject, slot);
357 void setJSSVGPolygonElementXmllang(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
365 void setJSSVGPolygonElementXmlspace(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
373 JSValue JSSVGPolygonElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
375 return getDOMConstructor<JSSVGPolygonElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
378 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionHasExtension(ExecState* exec)
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());
390 JSC::JSValue result = jsBoolean(imp->hasExtension(extension));
391 return JSValue::encode(result);
394 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetPresentationAttribute(ExecState* exec)
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());
406 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
407 return JSValue::encode(result);
410 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetBBox(ExecState* exec)
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());
419 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<FloatRect>::create(imp->getBBox())));
420 return JSValue::encode(result);
423 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetCTM(ExecState* exec)
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());
432 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGMatrix>::create(imp->getCTM())));
433 return JSValue::encode(result);
436 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetScreenCTM(ExecState* exec)
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());
445 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGMatrix>::create(imp->getScreenCTM())));
446 return JSValue::encode(result);
449 EncodedJSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetTransformToElement(ExecState* exec)
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());
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);
470 #endif // ENABLE(SVG)