| Summary: | Refactor code creating css values and lists for animation and transition properties | ||||||
|---|---|---|---|---|---|---|---|
| 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 | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=234792 | ||||||
| Attachments: |
|
||||||
|
Description
Antoine Quint
2022-01-03 04:13:29 PST
This is work that started from a comment made by Darin in bug 234792. Created attachment 448225 [details]
Patch
Comment on attachment 448225 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448225&action=review > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1450 > +void ComputedStyleExtractor::addCSSValueForAnimationPropertyToList(CSSPropertyID property, const Animation* animation, CSSValueList& list) I'd make the target list the first argument. Comment on attachment 448225 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448225&action=review >> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1450 >> +void ComputedStyleExtractor::addCSSValueForAnimationPropertyToList(CSSPropertyID property, const Animation* animation, CSSValueList& list) > > I'd make the target list the first argument. Also "CSS" in the name is bit unnecessary. Committed r287537 (245672@trunk): <https://commits.webkit.org/245672@trunk> Comment on attachment 448225 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448225&action=review >>> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1450 >>> +void ComputedStyleExtractor::addCSSValueForAnimationPropertyToList(CSSPropertyID property, const Animation* animation, CSSValueList& list) >> >> I'd make the target list the first argument. > > Also "CSS" in the name is bit unnecessary. I’d also leave out the “to list” part of the name, and say “append” instead of “add” appendValueForAnimationProperty > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1493 > + auto shorthand = shorthandForProperty(CSSPropertyAnimation); No need for a local variable here. Reads nicely inside the for statement. (In reply to Darin Adler from comment #7) > Comment on attachment 448225 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=448225&action=review > > > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1493 > > + auto shorthand = shorthandForProperty(CSSPropertyAnimation); > > No need for a local variable here. Reads nicely inside the for statement. I snuck that into some more refactoring in bug 234872. |