Esempio n. 1
0
void JSSVGPathSegArcRel::putValueProperty(ExecState* exec, int token, JSValue* value, int /*attr*/)
{
    switch (token) {
    case XAttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setX(value->toFloat(exec));
        break;
    }
    case YAttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setY(value->toFloat(exec));
        break;
    }
    case R1AttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setR1(value->toFloat(exec));
        break;
    }
    case R2AttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setR2(value->toFloat(exec));
        break;
    }
    case AngleAttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setAngle(value->toFloat(exec));
        break;
    }
    case LargeArcFlagAttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setLargeArcFlag(value->toBoolean(exec));
        break;
    }
    case SweepFlagAttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setSweepFlag(value->toBoolean(exec));
        break;
    }
    }
    if (context())
        context()->notifyAttributeChange();
}
Esempio n. 2
0
void JSSVGPathSegArcRel::putValueProperty(ExecState* exec, int token, JSValue* value, int /*attr*/)
{
    switch (token) {
    case XAttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setX(value->toFloat(exec));
        break;
    }
    case YAttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setY(value->toFloat(exec));
        break;
    }
    case R1AttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setR1(value->toFloat(exec));
        break;
    }
    case R2AttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setR2(value->toFloat(exec));
        break;
    }
    case AngleAttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setAngle(value->toFloat(exec));
        break;
    }
    case LargeArcFlagAttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setLargeArcFlag(value->toBoolean(exec));
        break;
    }
    case SweepFlagAttrNum: {
        SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

        imp->setSweepFlag(value->toBoolean(exec));
        break;
    }
    }
    SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(impl());

    ASSERT(exec && exec->dynamicInterpreter());
    Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
    if (!activeFrame)
        return;

    SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
    if (extensions && extensions->hasGenericContext<SVGPathSeg>(imp)) {
        const SVGElement* context = extensions->genericContext<SVGPathSeg>(imp);
        ASSERT(context);

        context->notifyAttributeChange();
    }

}