JSValue jsSVGLineElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { UNUSED_PARAM(exec); SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); return toJS(exec, WTF::getPtr(imp->style())); }
JSValue* JSSVGLineElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case X1AttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->x1Animated(); return toJS(exec, obj.get(), imp); } case Y1AttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->y1Animated(); return toJS(exec, obj.get(), imp); } case X2AttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->x2Animated(); return toJS(exec, obj.get(), imp); } case Y2AttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->y2Animated(); return toJS(exec, obj.get(), imp); } case RequiredFeaturesAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); } case RequiredExtensionsAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); } case SystemLanguageAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); } case XmllangAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return jsString(exec, imp->xmllang()); } case XmlspaceAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return jsString(exec, imp->xmlspace()); } case ExternalResourcesRequiredAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); return toJS(exec, obj.get(), imp); } case ClassNameAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); return toJS(exec, obj.get(), imp); } case StyleAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->style())); } case TransformAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); return toJS(exec, obj.get(), imp); } case NearestViewportElementAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); } case FarthestViewportElementAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); } } return 0; }
static v8::Handle<v8::Value> styleAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.SVGLineElement.style._get"); SVGLineElement* imp = V8SVGLineElement::toNative(info.Holder()); return toV8(imp->style()); }
JSValue* JSSVGLineElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case X1AttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->x1Animated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp); } } return toJS(exec, obj.get()); } case Y1AttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->y1Animated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp); } } return toJS(exec, obj.get()); } case X2AttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->x2Animated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp); } } return toJS(exec, obj.get()); } case Y2AttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->y2Animated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp); } } return toJS(exec, obj.get()); } case RequiredFeaturesAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->requiredFeatures())); } case RequiredExtensionsAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->requiredExtensions())); } case SystemLanguageAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->systemLanguage())); } case XmllangAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return jsString(imp->xmllang()); } case XmlspaceAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return jsString(imp->xmlspace()); } case ExternalResourcesRequiredAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedBoolean>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedBoolean>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedBoolean>(obj.get(), imp); } } return toJS(exec, obj.get()); } case ClassNameAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedString>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedString>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedString>(obj.get(), imp); } } return toJS(exec, obj.get()); } case StyleAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->style())); } case TransformAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedTransformList>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedTransformList>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedTransformList>(obj.get(), imp); } } return toJS(exec, obj.get()); } case NearestViewportElementAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); } case FarthestViewportElementAttrNum: { SVGLineElement* imp = static_cast<SVGLineElement*>(impl()); return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); } } return 0; }