Bug 237357

Summary: [web-animations] changes to font-size should recompute keyframes
Product: WebKit Reporter: Antoine Quint <graouts>
Component: AnimationsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, graouts, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar, WebExposed, WPTImpact
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch ews-feeder: commit-queue-

Description Antoine Quint 2022-03-02 01:37:29 PST
[web-animations] changes to font-size should recompute keyframes
Comment 1 Antoine Quint 2022-03-02 01:40:55 PST
Created attachment 453580 [details]
Patch
Comment 2 Antoine Quint 2022-03-02 01:47:24 PST
Created attachment 453581 [details]
Patch
Comment 3 Antti Koivisto 2022-03-02 02:13:46 PST
Comment on attachment 453581 [details]
Patch

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

> Source/WebCore/animation/KeyframeEffectStack.cpp:146
> -        if (propertyAffectingLogicalPropertiesChanged)
> -            effect->propertyAffectingLogicalPropertiesDidChange(unanimatedStyle, resolutionContext);
> +        if (propertyAffectingLogicalPropertiesChanged || fontSizeChanged)
> +            effect->propertyAffectingKeyframeResolutionDidChange(unanimatedStyle, resolutionContext);

This is probably incomplete as various other things can affect unit resolution (like zoom property).
Comment 4 Antoine Quint 2022-03-02 02:17:42 PST
(In reply to Antti Koivisto from comment #3)
> Comment on attachment 453581 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=453581&action=review
> 
> > Source/WebCore/animation/KeyframeEffectStack.cpp:146
> > -        if (propertyAffectingLogicalPropertiesChanged)
> > -            effect->propertyAffectingLogicalPropertiesDidChange(unanimatedStyle, resolutionContext);
> > +        if (propertyAffectingLogicalPropertiesChanged || fontSizeChanged)
> > +            effect->propertyAffectingKeyframeResolutionDidChange(unanimatedStyle, resolutionContext);
> 
> This is probably incomplete as various other things can affect unit
> resolution (like zoom property).

Excellent! Do you know of others?
Comment 5 Antoine Quint 2022-03-02 04:40:04 PST
Created attachment 453588 [details]
Patch
Comment 6 Antti Koivisto 2022-03-02 04:53:29 PST
> Excellent! Do you know of others?

Stuff that shows up in CSSPrimitiveValue::computeNonCalcLengthDouble and pals I suppose.
Comment 7 EWS 2022-03-02 07:29:16 PST
Committed r290730 (247977@main): <https://commits.webkit.org/247977@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453588 [details].
Comment 8 Radar WebKit Bug Importer 2022-03-02 07:30:20 PST
<rdar://problem/89686859>