Example #1
0
JSValue jsSVGPathSegPathSegTypeAsLetter(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSSVGPathSeg* castedThis = static_cast<JSSVGPathSeg*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGPathSeg* imp = static_cast<SVGPathSeg*>(castedThis->impl());
    JSValue result = jsString(exec, imp->pathSegTypeAsLetter());
    return result;
}
Example #2
0
JSValue* JSSVGPathSeg::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case PathSegTypeAttrNum: {
        SVGPathSeg* imp = static_cast<SVGPathSeg*>(impl());
        return jsNumber(exec, imp->pathSegType());
    }
    case PathSegTypeAsLetterAttrNum: {
        SVGPathSeg* imp = static_cast<SVGPathSeg*>(impl());
        return jsString(exec, imp->pathSegTypeAsLetter());
    }
    case ConstructorAttrNum:
        return getConstructor(exec);
    }
    return 0;
}
static v8::Handle<v8::Value> pathSegTypeAsLetterAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    SVGPathSeg* imp = V8SVGPathSeg::toNative(info.Holder());
    return v8String(imp->pathSegTypeAsLetter(), info.GetIsolate());
}