Refactor code creating css values and lists for animation and transition properties
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>
<rdar://problem/87065662>
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.