RESOLVED FIXED Bug 234792
"animation" shorthand should list all longhand values when serializing
https://bugs.webkit.org/show_bug.cgi?id=234792
Summary "animation" shorthand should list all longhand values when serializing
Antoine Quint
Reported 2022-01-02 00:26:44 PST
"animation" shorthand should list all longhand values when serializing
Attachments
Patch (32.79 KB, patch)
2022-01-02 00:32 PST, Antoine Quint
no flags
Patch (33.57 KB, patch)
2022-01-02 02:50 PST, Antoine Quint
darin: review+
Antoine Quint
Comment 1 2022-01-02 00:32:15 PST
Antoine Quint
Comment 2 2022-01-02 02:50:35 PST
Darin Adler
Comment 3 2022-01-02 11:44:42 PST
Comment on attachment 448171 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448171&action=review > Source/WebCore/css/parser/CSSPropertyParser.cpp:1662 > + if (property == CSSPropertyAnimationDuration) We can and should make this code less repetitive. One function to turn a property into a value, rather than repeating the append calls. Can just take a property ID as an argument and return a Ref<>. A lambda if you prefer but I think a separate named function would be good.
Antoine Quint
Comment 4 2022-01-03 02:01:07 PST
Radar WebKit Bug Importer
Comment 5 2022-01-03 02:02:21 PST
Antoine Quint
Comment 6 2022-01-03 02:15:13 PST
(In reply to Darin Adler from comment #3) > Comment on attachment 448171 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=448171&action=review > > > Source/WebCore/css/parser/CSSPropertyParser.cpp:1662 > > + if (property == CSSPropertyAnimationDuration) > > We can and should make this code less repetitive. One function to turn a > property into a value, rather than repeating the append calls. Can just take > a property ID as an argument and return a Ref<>. A lambda if you prefer but > I think a separate named function would be good. I landed the patch as-is but would like to address this, however I don't understand what you're driving at. Are you thinking of a function like this? void ComputedStyleExtractor::addValueForAnimationPropertyToList(CSSPropertyID, CSSValueList&) This could be useful also for the changes made for bug 234785. I'll probably make a followup to refactor once bug 234785 lands.
Antoine Quint
Comment 7 2022-01-03 04:14:49 PST
Refactoring is happening in bug 234812.
Note You need to log in before you can comment on or make changes to this bug.