[Webkit-unassigned] [Bug 64104] SVG animation API crashes on SVGAnimateTransform
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 14 10:43:24 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=64104
Kulanthaivel Palanichamy <kulanthaivel at codeaurora.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kulanthaivel at codeaurora.org
--- Comment #7 from Kulanthaivel Palanichamy <kulanthaivel at codeaurora.org> 2011-07-14 10:43:24 PST ---
(In reply to comment #6)
> (In reply to comment #5)
> > (From update of attachment 100724 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=100724&action=review
> >
> > Patch looks great, still some questions before I can set r+/r-:
> >
> > >> Source/WebCore/svg/SVGAnimateTransformElement.cpp:124
> > >> + return static_cast<SVGStyledTransformableElement*>(element)->transformAnimated();
> > >
> > > we don't want to have animVal but baseVal here.
> >
> > This is not related. "fooAnimated()" gives back an SVGAnimatedProperty which holds both animVal and baseVal.
> >
> > > Source/WebCore/svg/SVGAnimateTransformElement.cpp:154
> > > + if (RefPtr<SVGAnimatedTransformList> list = animatedTransformListFor(targetElement)) {
> > > + list->detachListWrappers(0);
> > > + list->values().clear();
> > > + }
> >
> > This is just fine as-is. When we support animVal, we want to clear only the anim val wrappers and list here, not the baseVal.
> >
> > > Source/WebCore/svg/SVGAnimateTransformElement.cpp:173
> > > + if (!isAdditive()) {
> > > + animatedList->detachListWrappers(0);
> > > + animatedList->values().clear();
> > > + }
> >
> > Ditto.
> >
> > > Source/WebCore/svg/SVGAnimateTransformElement.cpp:178
> > > + animatedList->wrappers().append(static_cast<WebCore::SVGPropertyTearOff<SVGTransform> *>(0));
> >
> > Why is passing 0 safe here?
> Self-reply: passing 0 is correct, as the wrapper only comes to existance if it's used from JS. If it's not used no wrapper will ever be created - though the wrapper list size must always be equal to the values list size, so what you're doing is correct. Doesn't animatedList->wrappers().append(nullptr) work the same?
No, it doesn't work. I got the following error when I used nullptr
error C2664: 'WTF::RefPtr<T>::RefPtr(T *)' : cannot convert parameter 1 from 'const std::nullptr_t' to 'WebCore::SVGPropertyTearOff<PropertyType> *'
--
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