static v8::Handle<v8::Value> getTransformToElementCallback(const v8::Arguments& args) { SVGSwitchElement* imp = V8SVGSwitchElement::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* jsSVGSwitchElementPrototypeFunctionGetTransformToElement(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGSwitchElement::s_info)) return throwError(exec, TypeError); JSSVGSwitchElement* castedThisObj = static_cast<JSSVGSwitchElement*>(thisValue); SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThisObj->impl()); ExceptionCode ec = 0; SVGElement* element = toSVGElement(args.at(exec, 0)); JSC::JSValue* result = toJS(exec, JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; }
JSValue JSC_HOST_CALL jsSVGSwitchElementPrototypeFunctionGetTransformToElement(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.inherits(&JSSVGSwitchElement::s_info)) return throwError(exec, TypeError); JSSVGSwitchElement* castedThisObj = static_cast<JSSVGSwitchElement*>(asObject(thisValue)); SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThisObj->impl()); ExceptionCode ec = 0; SVGElement* element = toSVGElement(args.at(0)); JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getTransformToElement(element, ec)).get(), 0 /* no context on purpose */); setDOMException(exec, ec); return result; }