예제 #1
0
JSValue* JSSVGMarkerElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
    if (!thisObj->inherits(&JSSVGMarkerElement::info))
      return throwError(exec, TypeError);

    JSSVGMarkerElement* castedThisObj = static_cast<JSSVGMarkerElement*>(thisObj);
    SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThisObj->impl());

    switch (id) {
    case JSSVGMarkerElement::SetOrientToAutoFuncNum: {

        imp->setOrientToAuto();
        return jsUndefined();
    }
    case JSSVGMarkerElement::SetOrientToAngleFuncNum: {
        SVGAngle* angle = toSVGAngle(args[0]);

        imp->setOrientToAngle(angle);
        return jsUndefined();
    }
    case JSSVGMarkerElement::GetPresentationAttributeFuncNum: {
        String name = args[0]->toString(exec);


        KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name)));
        return result;
    }
    }
    return 0;
}
예제 #2
0
static v8::Handle<v8::Value> setOrientToAutoCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.SVGMarkerElement.setOrientToAuto");
    SVGMarkerElement* imp = V8SVGMarkerElement::toNative(args.Holder());
    imp->setOrientToAuto();
    return v8::Handle<v8::Value>();
}
예제 #3
0
JSValue* jsSVGMarkerElementPrototypeFunctionSetOrientToAuto(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
    if (!thisValue->isObject(&JSSVGMarkerElement::s_info))
        return throwError(exec, TypeError);
    JSSVGMarkerElement* castedThisObj = static_cast<JSSVGMarkerElement*>(thisValue);
    SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThisObj->impl());

    imp->setOrientToAuto();
    return jsUndefined();
}
JSValue JSC_HOST_CALL jsSVGMarkerElementPrototypeFunctionSetOrientToAuto(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.inherits(&JSSVGMarkerElement::s_info))
        return throwError(exec, TypeError);
    JSSVGMarkerElement* castedThisObj = static_cast<JSSVGMarkerElement*>(asObject(thisValue));
    SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThisObj->impl());

    imp->setOrientToAuto();
    return jsUndefined();
}