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 "JSSVGClipPathElement.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 "JSSVGAnimatedEnumeration.h"
36 #include "JSSVGAnimatedString.h"
37 #include "JSSVGAnimatedTransformList.h"
38 #include "JSSVGElement.h"
39 #include "JSSVGMatrix.h"
40 #include "JSSVGRect.h"
41 #include "JSSVGStringList.h"
43 #include "SVGClipPathElement.h"
44 #include "SVGElement.h"
45 #include "SVGMatrix.h"
47 #include "SVGStringList.h"
48 #include <runtime/Error.h>
49 #include <runtime/JSString.h>
50 #include <wtf/GetPtr.h>
56 ASSERT_CLASS_FITS_IN_CELL(JSSVGClipPathElement);
60 #define THUNK_GENERATOR(generator) , generator
62 #define THUNK_GENERATOR(generator)
65 #define INTRINSIC(intrinsic) , intrinsic
67 #define INTRINSIC(intrinsic)
70 static const HashTableValue JSSVGClipPathElementTableValues[] =
72 { "clipPathUnits", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementClipPathUnits), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
73 { "requiredFeatures", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementRequiredFeatures), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
74 { "requiredExtensions", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementRequiredExtensions), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
75 { "systemLanguage", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementSystemLanguage), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
76 { "xmllang", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementXmllang), (intptr_t)setJSSVGClipPathElementXmllang THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
77 { "xmlspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementXmlspace), (intptr_t)setJSSVGClipPathElementXmlspace THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
78 { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
79 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementClassName), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
80 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementStyle), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
81 { "transform", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementTransform), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
82 { "nearestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementNearestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
83 { "farthestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementFarthestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
84 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGClipPathElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
85 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
88 #undef THUNK_GENERATOR
89 static const HashTable JSSVGClipPathElementTable = { 35, 31, JSSVGClipPathElementTableValues, 0 };
90 /* Hash table for constructor */
92 #define THUNK_GENERATOR(generator) , generator
94 #define THUNK_GENERATOR(generator)
97 #define INTRINSIC(intrinsic) , intrinsic
99 #define INTRINSIC(intrinsic)
102 static const HashTableValue JSSVGClipPathElementConstructorTableValues[] =
104 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
107 #undef THUNK_GENERATOR
108 static const HashTable JSSVGClipPathElementConstructorTable = { 1, 0, JSSVGClipPathElementConstructorTableValues, 0 };
109 const ClassInfo JSSVGClipPathElementConstructor::s_info = { "SVGClipPathElementConstructor", &DOMConstructorObject::s_info, &JSSVGClipPathElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGClipPathElementConstructor) };
111 JSSVGClipPathElementConstructor::JSSVGClipPathElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
112 : DOMConstructorObject(structure, globalObject)
116 void JSSVGClipPathElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
118 Base::finishCreation(exec->globalData());
119 ASSERT(inherits(&s_info));
120 putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGClipPathElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
123 bool JSSVGClipPathElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
125 return getStaticValueSlot<JSSVGClipPathElementConstructor, JSDOMWrapper>(exec, &JSSVGClipPathElementConstructorTable, static_cast<JSSVGClipPathElementConstructor*>(cell), propertyName, slot);
128 bool JSSVGClipPathElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
130 return getStaticValueDescriptor<JSSVGClipPathElementConstructor, JSDOMWrapper>(exec, &JSSVGClipPathElementConstructorTable, static_cast<JSSVGClipPathElementConstructor*>(object), propertyName, descriptor);
133 /* Hash table for prototype */
135 #define THUNK_GENERATOR(generator) , generator
137 #define THUNK_GENERATOR(generator)
140 #define INTRINSIC(intrinsic) , intrinsic
142 #define INTRINSIC(intrinsic)
145 static const HashTableValue JSSVGClipPathElementPrototypeTableValues[] =
147 { "hasExtension", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGClipPathElementPrototypeFunctionHasExtension), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
148 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGClipPathElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
149 { "getBBox", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGClipPathElementPrototypeFunctionGetBBox), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
150 { "getCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGClipPathElementPrototypeFunctionGetCTM), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
151 { "getScreenCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGClipPathElementPrototypeFunctionGetScreenCTM), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
152 { "getTransformToElement", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGClipPathElementPrototypeFunctionGetTransformToElement), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
153 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
156 #undef THUNK_GENERATOR
157 static const HashTable JSSVGClipPathElementPrototypeTable = { 17, 15, JSSVGClipPathElementPrototypeTableValues, 0 };
158 const ClassInfo JSSVGClipPathElementPrototype::s_info = { "SVGClipPathElementPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGClipPathElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGClipPathElementPrototype) };
160 JSObject* JSSVGClipPathElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
162 return getDOMPrototype<JSSVGClipPathElement>(exec, globalObject);
165 bool JSSVGClipPathElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
167 JSSVGClipPathElementPrototype* thisObject = jsCast<JSSVGClipPathElementPrototype*>(cell);
168 return getStaticFunctionSlot<JSObject>(exec, &JSSVGClipPathElementPrototypeTable, thisObject, propertyName, slot);
171 bool JSSVGClipPathElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
173 JSSVGClipPathElementPrototype* thisObject = jsCast<JSSVGClipPathElementPrototype*>(object);
174 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGClipPathElementPrototypeTable, thisObject, propertyName, descriptor);
177 const ClassInfo JSSVGClipPathElement::s_info = { "SVGClipPathElement", &JSSVGElement::s_info, &JSSVGClipPathElementTable, 0 , CREATE_METHOD_TABLE(JSSVGClipPathElement) };
179 JSSVGClipPathElement::JSSVGClipPathElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGClipPathElement> impl)
180 : JSSVGElement(structure, globalObject, impl)
184 void JSSVGClipPathElement::finishCreation(JSGlobalData& globalData)
186 Base::finishCreation(globalData);
187 ASSERT(inherits(&s_info));
190 JSObject* JSSVGClipPathElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
192 return JSSVGClipPathElementPrototype::create(exec->globalData(), globalObject, JSSVGClipPathElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
195 bool JSSVGClipPathElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
197 JSSVGClipPathElement* thisObject = jsCast<JSSVGClipPathElement*>(cell);
198 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
199 return getStaticValueSlot<JSSVGClipPathElement, Base>(exec, &JSSVGClipPathElementTable, thisObject, propertyName, slot);
202 bool JSSVGClipPathElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
204 JSSVGClipPathElement* thisObject = jsCast<JSSVGClipPathElement*>(object);
205 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
206 return getStaticValueDescriptor<JSSVGClipPathElement, Base>(exec, &JSSVGClipPathElementTable, thisObject, propertyName, descriptor);
209 JSValue jsSVGClipPathElementClipPathUnits(ExecState* exec, JSValue slotBase, const Identifier&)
211 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
213 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
214 RefPtr<SVGAnimatedEnumeration> obj = imp->clipPathUnitsAnimated();
215 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
220 JSValue jsSVGClipPathElementRequiredFeatures(ExecState* exec, JSValue slotBase, const Identifier&)
222 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
224 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
225 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->requiredFeatures())));
230 JSValue jsSVGClipPathElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&)
232 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
234 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
235 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->requiredExtensions())));
240 JSValue jsSVGClipPathElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&)
242 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
244 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
245 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->systemLanguage())));
250 JSValue jsSVGClipPathElementXmllang(ExecState* exec, JSValue slotBase, const Identifier&)
252 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
254 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
255 JSValue result = jsString(exec, imp->xmllang());
260 JSValue jsSVGClipPathElementXmlspace(ExecState* exec, JSValue slotBase, const Identifier&)
262 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
264 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
265 JSValue result = jsString(exec, imp->xmlspace());
270 JSValue jsSVGClipPathElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&)
272 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
274 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
275 RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
276 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
281 JSValue jsSVGClipPathElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
283 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
285 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
286 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
287 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
292 JSValue jsSVGClipPathElementStyle(ExecState* exec, JSValue slotBase, const Identifier&)
294 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
296 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
297 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
302 JSValue jsSVGClipPathElementTransform(ExecState* exec, JSValue slotBase, const Identifier&)
304 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
306 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
307 RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated();
308 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
313 JSValue jsSVGClipPathElementNearestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&)
315 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
317 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
318 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement()));
323 JSValue jsSVGClipPathElementFarthestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&)
325 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
327 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
328 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement()));
333 JSValue jsSVGClipPathElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
335 JSSVGClipPathElement* domObject = static_cast<JSSVGClipPathElement*>(asObject(slotBase));
336 return JSSVGClipPathElement::getConstructor(exec, domObject->globalObject());
339 void JSSVGClipPathElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
341 JSSVGClipPathElement* thisObject = jsCast<JSSVGClipPathElement*>(cell);
342 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
343 lookupPut<JSSVGClipPathElement, Base>(exec, propertyName, value, &JSSVGClipPathElementTable, thisObject, slot);
346 void setJSSVGClipPathElementXmllang(ExecState* exec, JSObject* thisObject, JSValue value)
348 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(thisObject);
349 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
350 imp->setXmllang(ustringToString(value.isEmpty() ? UString() : value.toString(exec)));
354 void setJSSVGClipPathElementXmlspace(ExecState* exec, JSObject* thisObject, JSValue value)
356 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(thisObject);
357 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
358 imp->setXmlspace(ustringToString(value.isEmpty() ? UString() : value.toString(exec)));
362 JSValue JSSVGClipPathElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
364 return getDOMConstructor<JSSVGClipPathElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
367 EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionHasExtension(ExecState* exec)
369 JSValue thisValue = exec->hostThisValue();
370 if (!thisValue.inherits(&JSSVGClipPathElement::s_info))
371 return throwVMTypeError(exec);
372 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(thisValue));
373 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGClipPathElement::s_info);
374 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
375 const String& extension(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
376 if (exec->hadException())
377 return JSValue::encode(jsUndefined());
379 JSC::JSValue result = jsBoolean(imp->hasExtension(extension));
380 return JSValue::encode(result);
383 EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetPresentationAttribute(ExecState* exec)
385 JSValue thisValue = exec->hostThisValue();
386 if (!thisValue.inherits(&JSSVGClipPathElement::s_info))
387 return throwVMTypeError(exec);
388 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(thisValue));
389 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGClipPathElement::s_info);
390 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
391 const String& name(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
392 if (exec->hadException())
393 return JSValue::encode(jsUndefined());
395 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
396 return JSValue::encode(result);
399 EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetBBox(ExecState* exec)
401 JSValue thisValue = exec->hostThisValue();
402 if (!thisValue.inherits(&JSSVGClipPathElement::s_info))
403 return throwVMTypeError(exec);
404 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(thisValue));
405 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGClipPathElement::s_info);
406 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
408 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<FloatRect>::create(imp->getBBox())));
409 return JSValue::encode(result);
412 EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetCTM(ExecState* exec)
414 JSValue thisValue = exec->hostThisValue();
415 if (!thisValue.inherits(&JSSVGClipPathElement::s_info))
416 return throwVMTypeError(exec);
417 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(thisValue));
418 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGClipPathElement::s_info);
419 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
421 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGMatrix>::create(imp->getCTM())));
422 return JSValue::encode(result);
425 EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetScreenCTM(ExecState* exec)
427 JSValue thisValue = exec->hostThisValue();
428 if (!thisValue.inherits(&JSSVGClipPathElement::s_info))
429 return throwVMTypeError(exec);
430 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(thisValue));
431 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGClipPathElement::s_info);
432 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
434 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGMatrix>::create(imp->getScreenCTM())));
435 return JSValue::encode(result);
438 EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetTransformToElement(ExecState* exec)
440 JSValue thisValue = exec->hostThisValue();
441 if (!thisValue.inherits(&JSSVGClipPathElement::s_info))
442 return throwVMTypeError(exec);
443 JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(thisValue));
444 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGClipPathElement::s_info);
445 SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl());
446 ExceptionCode ec = 0;
447 SVGElement* element(toSVGElement(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
448 if (exec->hadException())
449 return JSValue::encode(jsUndefined());
451 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGMatrix>::create(imp->getTransformToElement(element, ec))));
452 setDOMException(exec, ec);
453 return JSValue::encode(result);
459 #endif // ENABLE(SVG)