[Webkit-unassigned] [Bug 22384] svg <text> fails to update when setting x/y
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 11 10:56:16 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=22384
Adam Roben (aroben) <aroben at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #46289|review? |review+
Flag| |
--- Comment #14 from Adam Roben (aroben) <aroben at apple.com> 2010-01-11 10:56:15 PST ---
(From update of attachment 46289)
> + Introduce JSSVGCustomListTemplate, refactoring the existing custom code for SVG POD type lists.
This is now spelled correctly, but doesn't reflect your patch :-)
> + Remove the need for custom JSSVG*List.cpp implementations, but instead tweak CodeGeneratorJS.pm,
> + to call into the new JSSVGCustomListTemplate methods. Fixes dynamic updates of the SVGTextElement
Ditto.
> +// Helper structure only containing public typedefs, as C++ does not allow templatified typedefs
I think the common term is "templatized".
> +template<typename JSPODListType, typename PODType>
> +static JSC::JSValue finishGetter(JSC::ExecState* exec, ExceptionCode& ec, SVGElement* context,
> + typename JSSVGPODListTraits<PODType>::PODList* list,
> + PassRefPtr<typename JSSVGPODListTraits<PODType>::PODListItem> item)
> {
> if (ec) {
> setDOMException(exec, ec);
> - return jsUndefined();
> + return JSC::jsUndefined();
> }
> - return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<SVGTransform>::create(item.get(), list->associatedAttributeName()).get(), context);
> +
> + return toJS(exec, deprecatedGlobalObjectForPrototype(exec),
> + JSSVGPODTypeWrapperCreatorForList<PODType>::create(item.get(), list->associatedAttributeName()).get(), context);
> }
>
> -static JSValue finishSetter(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGTransformList* list, PassRefPtr<PODListItem> item)
> +template<typename JSPODListType, typename PODType>
> +static JSC::JSValue finishSetter(JSC::ExecState* exec, ExceptionCode& ec, SVGElement* context,
> + typename JSSVGPODListTraits<PODType>::PODList* list,
> + PassRefPtr<typename JSSVGPODListTraits<PODType>::PODListItem> item)
> {
> if (ec) {
> setDOMException(exec, ec);
> - return jsUndefined();
> + return JSC::jsUndefined();
> }
> +
> const QualifiedName& attributeName = list->associatedAttributeName();
> context->svgAttributeChanged(attributeName);
> - return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<SVGTransform>::create(item.get(), attributeName).get(), context);
> +
> + return toJS(exec, deprecatedGlobalObjectForPrototype(exec),
> + JSSVGPODTypeWrapperCreatorForList<PODType>::create(item.get(), attributeName).get(), context);
> }
>
> -static JSValue finishSetterReadOnlyResult(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGTransformList* list, PassRefPtr<PODListItem> item)
> +template<typename JSPODListType, typename PODType>
> +static JSC::JSValue finishSetterReadOnlyResult(JSC::ExecState* exec, ExceptionCode& ec, SVGElement* context,
> + typename JSSVGPODListTraits<PODType>::PODList* list,
> + PassRefPtr<typename JSSVGPODListTraits<PODType>::PODListItem> item)
> {
> if (ec) {
> setDOMException(exec, ec);
> - return jsUndefined();
> + return JSC::jsUndefined();
> }
> context->svgAttributeChanged(list->associatedAttributeName());
> - return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGTransform>::create(*item).get(), context);
> + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<PODType>::create(*item).get(), context);
> }
Seems like these functions don't need the JSPODListType template parameter.
> + return finishSetter<JSPODListType, PODType>(exec, ec, wrapper->context(), listImp,
> + listImp->initialize(JSSVGPODListTraits<PODType>::PODListItem::copy(conversion(args.at(0))), ec));
> +
> }
If you remove the JSPODListType template parameter from finishSetter, I think
the compiler will be able to deduce the other template parameter. (Ditto for
finishSetterReadOnlyResult and finishGetter.)
> + push(@implContent, " return JSSVGPODListCustom::$functionImplementationName<$className, " . GetNativeType($svgPODListType)
> + . ">(castedThisObj, exec, args, &to" . $svgPODListType . ");\n");
You also don't need the "&" here to create the function pointer. (C++ allows
omitting it.)
r=me
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list