Bug 224012 - Move AnimationTimeline methods related to Styleable to Styleable
Summary: Move AnimationTimeline methods related to Styleable to Styleable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-31 12:38 PDT by Antoine Quint
Modified: 2021-03-31 23:34 PDT (History)
12 users (show)

See Also:


Attachments
Patch (75.20 KB, patch)
2021-03-31 12:43 PDT, Antoine Quint
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (75.23 KB, patch)
2021-03-31 12:55 PDT, Antoine Quint
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>