Bug 224012

Summary: Move AnimationTimeline methods related to Styleable to Styleable
Product: WebKit Reporter: Antoine Quint <graouts>
Component: AnimationsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, cmarcelo, dino, esprehn+autocc, ews-watchlist, glenn, graouts, kangil.han, kondapallykalyan, pdr, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch dino: review+

Description Antoine Quint 2021-03-31 12:38:15 PDT
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.
Comment 1 Antoine Quint 2021-03-31 12:43:54 PDT
Created attachment 424803 [details]
Patch
Comment 2 Antoine Quint 2021-03-31 12:55:05 PDT
Created attachment 424807 [details]
Patch
Comment 3 Dean Jackson 2021-03-31 14:46:05 PDT
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?
Comment 4 Antoine Quint 2021-03-31 14:51:02 PDT
(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.
Comment 5 Antoine Quint 2021-03-31 23:33:34 PDT
Committed r275346 (236017@main): <https://commits.webkit.org/236017@main>
Comment 6 Radar WebKit Bug Importer 2021-03-31 23:34:13 PDT
<rdar://problem/76090629>