| Summary: | "animation" shorthand should list all longhand values when serializing | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Antoine Quint <graouts> | ||||||
| Component: | Animations | Assignee: | Antoine Quint <graouts> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | darin, dino, esprehn+autocc, ews-watchlist, glenn, graouts, gyuyoung.kim, koivisto, macpherson, menard, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar, WebExposed | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=234812 | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 235138 | ||||||||
| Attachments: |
|
||||||||
|
Description
Antoine Quint
2022-01-02 00:26:44 PST
Created attachment 448170 [details]
Patch
Created attachment 448171 [details]
Patch
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. Committed r287534 (245669@trunk): <https://commits.webkit.org/245669@trunk> (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. Refactoring is happening in bug 234812. |