JSValue jsSVGFEDiffuseLightingElementKernelUnitLengthY(ExecState* exec, const Identifier&, const PropertySlot& slot) { UNUSED_PARAM(exec); SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); RefPtr<SVGAnimatedNumber> obj = imp->kernelUnitLengthYAnimated(); return toJS(exec, obj.get(), imp); }
JSValue jsSVGFEDiffuseLightingElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { UNUSED_PARAM(exec); SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); return toJS(exec, obj.get(), imp); }
void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName) { SVGElement::svgAttributeChanged(attrName); if (attrName == SVGNames::azimuthAttr || attrName == SVGNames::elevationAttr || attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName == SVGNames::zAttr || attrName == SVGNames::pointsAtXAttr || attrName == SVGNames::pointsAtYAttr || attrName == SVGNames::pointsAtZAttr || attrName == SVGNames::specularExponentAttr || attrName == SVGNames::limitingConeAngleAttr) { ContainerNode* parent = parentNode(); if (!parent) return; RenderObject* renderer = parent->renderer(); if (!renderer || !renderer->isSVGResourceFilterPrimitive()) return; if (parent->hasTagName(SVGNames::feDiffuseLightingTag)) { SVGFEDiffuseLightingElement* diffuseLighting = static_cast<SVGFEDiffuseLightingElement*>(parent); diffuseLighting->lightElementAttributeChanged(this, attrName); return; } // Handler for SpecularLighting has not implemented yet. RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); } }
JSValue jsSVGFEDiffuseLightingElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); }
JSValue jsSVGFEDiffuseLightingElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); return toJS(exec, castedThis->globalObject(), obj.get(), imp); }
JSValue JSC_HOST_CALL jsSVGFEDiffuseLightingElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.isObject(&JSSVGFEDiffuseLightingElement::s_info)) return throwError(exec, TypeError); JSSVGFEDiffuseLightingElement* castedThisObj = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(thisValue)); SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThisObj->impl()); const UString& name = args.at(0).toString(exec); JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); return result; }
void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName) { if (!isSupportedAttribute(attrName)) { SVGElement::svgAttributeChanged(attrName); return; } SVGElementInstance::InvalidationGuard invalidationGuard(this); if (attrName == SVGNames::azimuthAttr || attrName == SVGNames::elevationAttr || attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName == SVGNames::zAttr || attrName == SVGNames::pointsAtXAttr || attrName == SVGNames::pointsAtYAttr || attrName == SVGNames::pointsAtZAttr || attrName == SVGNames::specularExponentAttr || attrName == SVGNames::limitingConeAngleAttr) { ContainerNode* parent = parentNode(); if (!parent) return; RenderObject* renderer = parent->renderer(); if (!renderer || !renderer->isSVGResourceFilterPrimitive()) return; if (parent->hasTagName(SVGNames::feDiffuseLightingTag)) { SVGFEDiffuseLightingElement* diffuseLighting = static_cast<SVGFEDiffuseLightingElement*>(parent); diffuseLighting->lightElementAttributeChanged(this, attrName); return; } else if (parent->hasTagName(SVGNames::feSpecularLightingTag)) { SVGFESpecularLightingElement* specularLighting = static_cast<SVGFESpecularLightingElement*>(parent); specularLighting->lightElementAttributeChanged(this, attrName); return; } } ASSERT_NOT_REACHED(); }
JSValue* JSSVGFEDiffuseLightingElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case In1AttrNum: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(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 SurfaceScaleAttrNum: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedNumber> obj = imp->surfaceScaleAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp); } } return toJS(exec, obj.get()); } case DiffuseConstantAttrNum: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedNumber> obj = imp->diffuseConstantAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp); } } return toJS(exec, obj.get()); } case KernelUnitLengthXAttrNum: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedNumber> obj = imp->kernelUnitLengthXAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp); } } return toJS(exec, obj.get()); } case KernelUnitLengthYAttrNum: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedNumber> obj = imp->kernelUnitLengthYAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp); } } return toJS(exec, obj.get()); } case XAttrNum: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(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: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(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: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(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: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(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: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(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: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(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: { SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(impl()); return toJS(exec, WTF::getPtr(imp->style())); } } return 0; }