[Web Animations] Make AnimationList ref-counted
Created attachment 388549 [details] Patch
Comment on attachment 388549 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388549&action=review > Source/WebCore/platform/animation/AnimationList.cpp:36 > +AnimationList::AnimationList() You can say = default > Source/WebCore/platform/animation/AnimationList.h:34 > +class AnimationList : public RefCounted<AnimationList> { You still want WTF_MAKE_FAST_ALLOCATED or one of its variants. > Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:152 > - , animations(o.animations ? makeUnique<AnimationList>(*o.animations) : nullptr) > - , transitions(o.transitions ? makeUnique<AnimationList>(*o.transitions) : nullptr) > + , animations(o.animations) > + , transitions(o.transitions) This no longer copies
Created attachment 388558 [details] Patch
> > Source/WebCore/platform/animation/AnimationList.h:34 > > +class AnimationList : public RefCounted<AnimationList> { > > You still want WTF_MAKE_FAST_ALLOCATED or one of its variants. No need, RefCounted is WTF_MAKE_FAST_ALLOCATED.
Comment on attachment 388558 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388558&action=review > Source/WebCore/platform/animation/AnimationList.h:38 > + static Ref<AnimationList> create(const AnimationList& other) { return adoptRef(*new AnimationList(other)); } copy() member function would be nicer.
(In reply to Antti Koivisto from comment #5) > Comment on attachment 388558 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=388558&action=review > > > Source/WebCore/platform/animation/AnimationList.h:38 > > + static Ref<AnimationList> create(const AnimationList& other) { return adoptRef(*new AnimationList(other)); } > > copy() member function would be nicer. Will fix in commit, thanks.
https://trac.webkit.org/changeset/254991
<rdar://problem/58841851>