示例#1
0
JSValue* JSSVGMarkerElement::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case RefXAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        RefPtr<SVGAnimatedLength> obj = imp->refXAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case RefYAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        RefPtr<SVGAnimatedLength> obj = imp->refYAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case MarkerUnitsAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        RefPtr<SVGAnimatedEnumeration> obj = imp->markerUnitsAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case MarkerWidthAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        RefPtr<SVGAnimatedLength> obj = imp->markerWidthAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case MarkerHeightAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        RefPtr<SVGAnimatedLength> obj = imp->markerHeightAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case OrientTypeAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        RefPtr<SVGAnimatedEnumeration> obj = imp->orientTypeAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case OrientAngleAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        RefPtr<SVGAnimatedAngle> obj = imp->orientAngleAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case XmllangAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        return jsString(imp->xmllang());
    }
    case XmlspaceAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        return jsString(imp->xmlspace());
    }
    case ExternalResourcesRequiredAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case ClassNameAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case StyleAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        return toJS(exec, WTF::getPtr(imp->style()));
    }
    case ViewBoxAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        RefPtr<SVGAnimatedRect> obj = imp->viewBoxAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case PreserveAspectRatioAttrNum: {
        SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(impl());

        RefPtr<SVGAnimatedPreserveAspectRatio> obj = imp->preserveAspectRatioAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case ConstructorAttrNum:
        return getConstructor(exec);
    }
    return 0;
}
示例#2
0
static v8::Handle<v8::Value> markerWidthAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.SVGMarkerElement.markerWidth._get");
    SVGMarkerElement* imp = V8SVGMarkerElement::toNative(info.Holder());
    return toV8(imp->markerWidthAnimated());
}