Bug 235008 - [Web Animations] getKeyframes() for a CSS Animation should not use computed style for keyframes
Summary: [Web Animations] getKeyframes() for a CSS Animation should not use computed s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks: 235138
  Show dependency treegraph
 
Reported: 2022-01-08 14:40 PST by Antoine Quint
Modified: 2022-01-12 12:35 PST (History)
5 users (show)

See Also:


Attachments
Patch (15.86 KB, patch)
2022-01-08 14:47 PST, Antoine Quint
koivisto: 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 2022-01-08 14:40:20 PST
[Web Animations] getKeyframes() for a CSS Animation should not use computed style for keyframes
Comment 1 Antoine Quint 2022-01-08 14:47:48 PST
Created attachment 448683 [details]
Patch
Comment 2 Antoine Quint 2022-01-09 07:35:24 PST
Committed r287820 (245872@trunk): <https://commits.webkit.org/245872@trunk>
Comment 3 Radar WebKit Bug Importer 2022-01-09 07:36:21 PST
<rdar://problem/87310877>
Comment 4 Darin Adler 2022-01-09 08:53:51 PST
Comment on attachment 448683 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=448683&action=review

> Source/WebCore/style/StyleResolver.h:142
> +    const Vector<Ref<StyleRuleKeyframe>> keyframeRulesForName(const AtomString&);

There signature here isn’t quite right. This should be a const member function and it should return a non-const Vector:

    Vector<Ref<StyleRuleKeyframe>> keyframeRulesForName(const AtomString&) const;
Comment 5 Antoine Quint 2022-01-09 12:29:56 PST
(In reply to Darin Adler from comment #4)
> Comment on attachment 448683 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=448683&action=review
> 
> > Source/WebCore/style/StyleResolver.h:142
> > +    const Vector<Ref<StyleRuleKeyframe>> keyframeRulesForName(const AtomString&);
> 
> There signature here isn’t quite right. This should be a const member
> function and it should return a non-const Vector:
> 
>     Vector<Ref<StyleRuleKeyframe>> keyframeRulesForName(const AtomString&)
> const;

Filed bug 235021 to fix this.
Comment 6 Antoine Quint 2022-01-10 05:03:12 PST
We'll fix more of this in bug 235028.