static v8::Handle<v8::Value> getTransformToElementCallback(const v8::Arguments& args) { SVGDefsElement* imp = V8SVGDefsElement::toNative(args.Holder()); ExceptionCode ec = 0; { V8TRYCATCH(SVGElement*, element, V8SVGElement::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)) ? V8SVGElement::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined))) : 0); SVGMatrix result = imp->getTransformToElement(element, ec); if (UNLIKELY(ec)) goto fail; return toV8Fast(WTF::getPtr(SVGPropertyTearOff<SVGMatrix>::create(result)), args, imp); } fail: return setDOMException(ec, args.GetIsolate()); }
JSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionGetTransformToElement(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.inherits(&JSSVGDefsElement::s_info)) return throwError(exec, TypeError); JSSVGDefsElement* castedThisObj = static_cast<JSSVGDefsElement*>(asObject(thisValue)); SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThisObj->impl()); ExceptionCode ec = 0; SVGElement* element = toSVGElement(args.at(0)); JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; }