Bug 206664

Summary: [Web Animations] Make AnimationList ref-counted
Product: WebKit Reporter: Antoine Quint <graouts>
Component: AnimationsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, esprehn+autocc, ews-watchlist, glenn, koivisto, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch koivisto: review+

Antoine Quint
Reported 2020-01-23 08:25:33 PST
[Web Animations] Make AnimationList ref-counted
Attachments
Patch (5.64 KB, patch)
2020-01-23 08:26 PST, Antoine Quint
no flags
Patch (5.75 KB, patch)
2020-01-23 10:02 PST, Antoine Quint
koivisto: review+
Antoine Quint
Comment 1 2020-01-23 08:26:13 PST
Simon Fraser (smfr)
Comment 2 2020-01-23 09:43:32 PST
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
Antoine Quint
Comment 3 2020-01-23 10:02:01 PST
Antti Koivisto
Comment 4 2020-01-23 10:42:22 PST
> > 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.
Antti Koivisto
Comment 5 2020-01-23 10:46:31 PST
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.
Antoine Quint
Comment 6 2020-01-23 11:16:13 PST
(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.
Antoine Quint
Comment 7 2020-01-23 11:24:29 PST
Radar WebKit Bug Importer
Comment 8 2020-01-23 11:25:19 PST
Note You need to log in before you can comment on or make changes to this bug.