static v8::Handle<v8::Value> getPresentationAttributeCallback(const v8::Arguments& args) { INC_STATS("DOM.SVGFEBlendElement.getPresentationAttribute"); SVGFEBlendElement* imp = V8SVGFEBlendElement::toNative(args.Holder()); STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, name, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); return toV8(imp->getPresentationAttribute(name)); }
JSValue* jsSVGFEBlendElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGFEBlendElement::s_info)) return throwError(exec, TypeError); JSSVGFEBlendElement* castedThisObj = static_cast<JSSVGFEBlendElement*>(thisValue); SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThisObj->impl()); const UString& name = args.at(exec, 0)->toString(exec); JSC::JSValue* result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); return result; }
JSValue* JSSVGFEBlendElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args) { if (!thisObj->inherits(&JSSVGFEBlendElement::info)) return throwError(exec, TypeError); JSSVGFEBlendElement* castedThisObj = static_cast<JSSVGFEBlendElement*>(thisObj); SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThisObj->impl()); switch (id) { case JSSVGFEBlendElement::GetPresentationAttributeFuncNum: { String name = args[0]->toString(exec); KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); return result; } } return 0; }
JSValue* JSSVGFEBlendElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case In1AttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); 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 In2AttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedString> obj = imp->in2Animated(); 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 ModeAttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedEnumeration> obj = imp->modeAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedEnumeration>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedEnumeration>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedEnumeration>(obj.get(), imp); } } return toJS(exec, obj.get()); } case XAttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(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: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(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: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(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: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(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: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(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: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(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: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); return toJS(exec, WTF::getPtr(imp->style())); } } return 0; }
JSValue* JSSVGFEBlendElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case In1AttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); return toJS(exec, obj.get(), imp); } case In2AttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); RefPtr<SVGAnimatedString> obj = imp->in2Animated(); return toJS(exec, obj.get(), imp); } case ModeAttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->modeAnimated(); return toJS(exec, obj.get(), imp); } case XAttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); return toJS(exec, obj.get(), imp); } case YAttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); return toJS(exec, obj.get(), imp); } case WidthAttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); return toJS(exec, obj.get(), imp); } case HeightAttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); return toJS(exec, obj.get(), imp); } case ResultAttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); return toJS(exec, obj.get(), imp); } case ClassNameAttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); return toJS(exec, obj.get(), imp); } case StyleAttrNum: { SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(impl()); return toJS(exec, WTF::getPtr(imp->style())); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }
static v8::Handle<v8::Value> heightAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.SVGFEBlendElement.height._get"); SVGFEBlendElement* imp = V8SVGFEBlendElement::toNative(info.Holder()); return toV8(imp->heightAnimated()); }
static v8::Handle<v8::Value> modeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.SVGFEBlendElement.mode._get"); SVGFEBlendElement* imp = V8SVGFEBlendElement::toNative(info.Holder()); return toV8(static_pointer_cast<SVGAnimatedEnumeration>(imp->modeAnimated())); }