JSValue* JSSVGFEImageElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case HrefAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); return toJS(exec, obj.get(), imp); } case XmllangAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); return jsString(imp->xmllang()); } case XmlspaceAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); return jsString(imp->xmlspace()); } case ExternalResourcesRequiredAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); return toJS(exec, obj.get(), imp); } case XAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); return toJS(exec, obj.get(), imp); } case YAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); return toJS(exec, obj.get(), imp); } case WidthAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); return toJS(exec, obj.get(), imp); } case HeightAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); return toJS(exec, obj.get(), imp); } case ResultAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); return toJS(exec, obj.get(), imp); } case ClassNameAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); return toJS(exec, obj.get(), imp); } case StyleAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); return toJS(exec, WTF::getPtr(imp->style())); } } return 0; }
JSValue* JSSVGFEImageElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case HrefAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); 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 XmllangAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); return jsString(imp->xmllang()); } case XmlspaceAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); return jsString(imp->xmlspace()); } case ExternalResourcesRequiredAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(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 XAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); 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 YAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); 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 WidthAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); 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 HeightAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); 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 ResultAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); 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 ClassNameAttrNum: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(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: { SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl()); return toJS(exec, WTF::getPtr(imp->style())); } } return 0; }
static v8::Handle<v8::Value> styleAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { SVGFEImageElement* imp = V8SVGFEImageElement::toNative(info.Holder()); return toV8Fast(imp->style(), info, imp); }