Ejemplo n.º 1
0
void setJSSVGAnimatedNumberBaseVal(ExecState* exec, JSObject* thisObject, JSValue value)
{
    SVGAnimatedNumber* imp = static_cast<SVGAnimatedNumber*>(static_cast<JSSVGAnimatedNumber*>(thisObject)->impl());
    imp->setBaseVal(value.toFloat(exec));
    if (static_cast<JSSVGAnimatedNumber*>(thisObject)->context())
        static_cast<JSSVGAnimatedNumber*>(thisObject)->context()->svgAttributeChanged(static_cast<JSSVGAnimatedNumber*>(thisObject)->impl()->associatedAttributeName());
}
Ejemplo n.º 2
0
void JSSVGAnimatedNumber::putValueProperty(ExecState* exec, int token, JSValue* value)
{
    switch (token) {
    case BaseValAttrNum: {
        SVGAnimatedNumber* imp = static_cast<SVGAnimatedNumber*>(impl());
        imp->setBaseVal(value->toFloat(exec));
        if (context())
            context()->svgAttributeChanged(impl()->associatedAttributeName());
        break;
    }
    }
}
Ejemplo n.º 3
0
JSValue* JSSVGAnimatedNumber::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case BaseValAttrNum: {
        SVGAnimatedNumber* imp = static_cast<SVGAnimatedNumber*>(impl());
        return jsNumber(exec, imp->baseVal());
    }
    case AnimValAttrNum: {
        SVGAnimatedNumber* imp = static_cast<SVGAnimatedNumber*>(impl());
        return jsNumber(exec, imp->animVal());
    }
    }
    return 0;
}