Ejemplo n.º 1
0
JSValue* jsSVGSwitchElementPrototypeFunctionGetScreenCTM(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());


    JSC::JSValue* result = toJS(exec, JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getScreenCTM()).get(), imp);
    return result;
}
static v8::Handle<v8::Value> getScreenCTMCallback(const v8::Arguments& args)
{
    SVGSwitchElement* imp = V8SVGSwitchElement::toNative(args.Holder());
    return toV8Fast(WTF::getPtr(SVGPropertyTearOff<SVGMatrix>::create(imp->getScreenCTM())), args, imp);
}
JSValue JSC_HOST_CALL jsSVGSwitchElementPrototypeFunctionGetScreenCTM(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());


    JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getScreenCTM()).get(), 0 /* no context on purpose */);
    return result;
}