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; }
static v8::Handle<v8::Value> getPresentationAttributeCallback(const v8::Arguments& args) { INC_STATS("DOM.SVGMarkerElement.getPresentationAttribute"); SVGMarkerElement* imp = V8SVGMarkerElement::toNative(args.Holder()); STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, name, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); return toV8(imp->getPresentationAttribute(name)); }
JSValue* jsSVGMarkerElementPrototypeFunctionGetPresentationAttribute(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()); const UString& name = args.at(exec, 0)->toString(exec); JSC::JSValue* result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); return result; }
JSValue JSC_HOST_CALL jsSVGMarkerElementPrototypeFunctionGetPresentationAttribute(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()); const UString& name = args.at(0).toString(exec); JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; }