A number of public methods on AnimationTimeline make no use of any AnimationTimeline instance variables and instead call into Styleable: void elementWasRemoved(const Styleable&); void willChangeRendererForStyleable(const Styleable&); void cancelDeclarativeAnimationsForStyleable(const Styleable&); void animationWasAddedToStyleable(WebAnimation&, const Styleable&); void animationWasRemovedFromStyleable(WebAnimation&, const Styleable&); void removeDeclarativeAnimationFromListsForOwningElement(WebAnimation&, const Styleable&); void updateCSSAnimationsForStyleable(const Styleable&, const RenderStyle* currentStyle, const RenderStyle& afterChangeStyle, const RenderStyle* parentElementStyle); void updateCSSTransitionsForStyleable(const Styleable&, const RenderStyle& currentStyle, const RenderStyle& newStyle); These should all be on Styleable.
Created attachment 424803 [details] Patch
Created attachment 424807 [details] Patch
Comment on attachment 424807 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424807&action=review > Source/WebCore/ChangeLog:21 > + These really belong on Styleable so we move them all over to that class with a new .cpp class > + for these non-trivial methods. Stylable is a pretty generic name, but all these functions are related to animations. Maybe this should be called something like AnimatableStyleable?
(In reply to Dean Jackson from comment #3) > Comment on attachment 424807 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=424807&action=review > > > Source/WebCore/ChangeLog:21 > > + These really belong on Styleable so we move them all over to that class with a new .cpp class > > + for these non-trivial methods. > > Stylable is a pretty generic name, but all these functions are related to > animations. Maybe this should be called something like AnimatableStyleable? A Styleable is a struct that is an Element/PseudoId pair. It's primarily used for animations, but not only.
Committed r275346 (236017@main): <https://commits.webkit.org/236017@main>
<rdar://problem/76090629>