EncodedJSValue jsSVGTransformListConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue, PropertyName) { JSSVGTransformList* domObject = jsDynamicCast<JSSVGTransformList*>(JSValue::decode(thisValue)); if (!domObject) return throwVMTypeError(exec); if (!domObject) return throwVMTypeError(exec); return JSValue::encode(JSSVGTransformList::getConstructor(exec->vm(), domObject->globalObject())); }
EncodedJSValue JSC_HOST_CALL jsSVGTransformListPrototypeFunctionConsolidate(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); JSSVGTransformList* castedThis = jsDynamicCast<JSSVGTransformList*>(thisValue); if (!castedThis) return throwVMTypeError(exec); ASSERT_GC_OBJECT_INHERITS(castedThis, JSSVGTransformList::info()); SVGTransformListPropertyTearOff & impl = castedThis->impl(); ExceptionCode ec = 0; JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.consolidate(ec))); setDOMException(exec, ec); return JSValue::encode(result); }
EncodedJSValue JSC_HOST_CALL jsSVGTransformListPrototypeFunctionRemoveItem(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); JSSVGTransformList* castedThis = jsDynamicCast<JSSVGTransformList*>(thisValue); if (!castedThis) return throwVMTypeError(exec); ASSERT_GC_OBJECT_INHERITS(castedThis, JSSVGTransformList::info()); SVGTransformListPropertyTearOff & impl = castedThis->impl(); if (exec->argumentCount() < 1) return throwVMError(exec, createNotEnoughArgumentsError(exec)); ExceptionCode ec = 0; unsigned index(toUInt32(exec, exec->argument(0), NormalConversion)); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.removeItem(index, ec))); setDOMException(exec, ec); return JSValue::encode(result); }
EncodedJSValue JSC_HOST_CALL jsSVGTransformListPrototypeFunctionCreateSVGTransformFromMatrix(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); JSSVGTransformList* castedThis = jsDynamicCast<JSSVGTransformList*>(thisValue); if (!castedThis) return throwVMTypeError(exec); ASSERT_GC_OBJECT_INHERITS(castedThis, JSSVGTransformList::info()); SVGTransformListPropertyTearOff & impl = castedThis->impl(); if (exec->argumentCount() < 1) return throwVMError(exec, createNotEnoughArgumentsError(exec)); ExceptionCode ec = 0; if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(JSSVGMatrix::info())) return throwVMTypeError(exec); SVGPropertyTearOff<SVGMatrix>* matrix(toSVGMatrix(exec->argument(0))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.createSVGTransformFromMatrix(matrix, ec))); setDOMException(exec, ec); return JSValue::encode(result); }