Bug 209872 - [css-flexbox] flex-grow property should be animatable
Summary: [css-flexbox] flex-grow property should be animatable
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sergio Villar Senin
Keywords: InRadar
Depends on:
Reported: 2020-04-01 13:07 PDT by Carlos Alberto Lopez Perez
Modified: 2020-10-15 00:56 PDT (History)
14 users (show)

See Also:

Patch (32.06 KB, patch)
2020-10-14 05:49 PDT, Sergio Villar Senin
graouts: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (39.74 KB, patch)
2020-10-14 07:21 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2020-04-01 13:07:41 PDT
The flex-grow property must be animatable


Here its a simple test case: https://codepen.io/cl0p3z/pen/yLNrNyN

Works on Chrome and Firefox. Fails on WebKit.

This its tested by WPT css/css-flexbox/animation/flex-grow-interpolation.html
Comment 1 Sergio Villar Senin 2020-10-14 05:49:01 PDT
Created attachment 411314 [details]
Comment 2 Antoine Quint 2020-10-14 05:58:20 PDT
Comment on attachment 411314 [details]

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

r+ assuming EWS bots are happy as well, thanks for adding this.

> Source/WebCore/rendering/style/RenderStyle.h:1104
> +    void setFlexGrow(float f) { float v = std::max<float>(f, 0.f); SET_NESTED_VAR(m_rareNonInheritedData, flexibleBox, flexGrow, v); }

Perhaps spell out what `v` stands for here. Since you're clamping, perhaps call that out in the variable name.
Comment 3 Sergio Villar Senin 2020-10-14 07:21:06 PDT
Created attachment 411321 [details]
Patch for landing
Comment 4 Sergio Villar Senin 2020-10-15 00:55:04 PDT
Committed r268516: <https://trac.webkit.org/changeset/268516>
Comment 5 Radar WebKit Bug Importer 2020-10-15 00:56:17 PDT