Exemple #1
0
JSValue jsSVGMarkerElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    UNUSED_PARAM(exec);
    SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl());
    RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
    return toJS(exec, obj.get(), imp);
}
JSValue jsSVGMarkerElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl());
    RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
    return result;
}
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;
}
Exemple #4
0
static v8::Handle<v8::Value> externalResourcesRequiredAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.SVGMarkerElement.externalResourcesRequired._get");
    SVGMarkerElement* imp = V8SVGMarkerElement::toNative(info.Holder());
    return toV8(imp->externalResourcesRequiredAnimated());
}