Esempio n. 1
0
void setJSSVGAnimatedIntegerBaseVal(ExecState* exec, JSObject* thisObject, JSValue value)
{
    SVGAnimatedInteger* imp = static_cast<SVGAnimatedInteger*>(static_cast<JSSVGAnimatedInteger*>(thisObject)->impl());
    imp->setBaseVal(value.toInt32(exec));
    if (static_cast<JSSVGAnimatedInteger*>(thisObject)->context())
        static_cast<JSSVGAnimatedInteger*>(thisObject)->context()->svgAttributeChanged(static_cast<JSSVGAnimatedInteger*>(thisObject)->impl()->associatedAttributeName());
}
static void baseValAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
    SVGAnimatedInteger* imp = V8SVGAnimatedInteger::toNative(info.Holder());
    int v = toInt32(value);
    ExceptionCode ec = 0;
    imp->setBaseVal(v, ec);
    if (UNLIKELY(ec))
        setDOMException(ec, info.GetIsolate());
    return;
}
static v8::Handle<v8::Value> animValAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    SVGAnimatedInteger* imp = V8SVGAnimatedInteger::toNative(info.Holder());
    return v8Integer(imp->animVal(), info.GetIsolate());
}