JSValue jsSVGGradientElementGradientUnits(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGGradientElement* castedThis = static_cast<JSSVGGradientElement*>(asObject(slotBase)); UNUSED_PARAM(exec); SVGGradientElement* imp = static_cast<SVGGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->gradientUnitsAnimated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; }
JSValue* JSSVGGradientElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case GradientUnitsAttrNum: { SVGGradientElement* imp = static_cast<SVGGradientElement*>(impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->gradientUnitsAnimated(); return toJS(exec, obj.get(), imp); } case GradientTransformAttrNum: { SVGGradientElement* imp = static_cast<SVGGradientElement*>(impl()); RefPtr<SVGAnimatedTransformList> obj = imp->gradientTransformAnimated(); return toJS(exec, obj.get(), imp); } case SpreadMethodAttrNum: { SVGGradientElement* imp = static_cast<SVGGradientElement*>(impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->spreadMethodAnimated(); return toJS(exec, obj.get(), imp); } case HrefAttrNum: { SVGGradientElement* imp = static_cast<SVGGradientElement*>(impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); return toJS(exec, obj.get(), imp); } case ExternalResourcesRequiredAttrNum: { SVGGradientElement* imp = static_cast<SVGGradientElement*>(impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); return toJS(exec, obj.get(), imp); } case ClassNameAttrNum: { SVGGradientElement* imp = static_cast<SVGGradientElement*>(impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); return toJS(exec, obj.get(), imp); } case StyleAttrNum: { SVGGradientElement* imp = static_cast<SVGGradientElement*>(impl()); return toJS(exec, WTF::getPtr(imp->style())); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }