Most of StylePropertyShorthand.* is boilerplate code that could easily be generated from CSSProperties.in file if we included in it the longhands for each shorthand property.
Created attachment 244719 [details] Patch
Created attachment 244724 [details] Patch
Created attachment 244729 [details] Patch
Comment on attachment 244729 [details] Patch Patch is ready for review.
Comment on attachment 244729 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=244729&action=review > Source/WebCore/css/makeprop.pl:956 > + print SHORTHANDS_CPP " return StylePropertyShorthand(CSSProperty" . $nameToId{$name} . ", " . $lowercaseId . "Properties, WTF_ARRAY_LENGTH(" . $lowercaseId . "Properties));\n"; Seems like we could avoid this WTF_ARRAY_LENGTH if we made the constructor a template that takes an array and deduces its length, like StringBuilder::appendLiteral, for example. Anything that reduces the amount of generated code and puts more of the code in normal C++ header files seems like a win to me. To state the obvious, we want the code generator to generate things that need to be repeated but make the actual code generated as minimal as we can.
Created attachment 244773 [details] Patch
(In reply to comment #5) > Comment on attachment 244729 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=244729&action=review > > > Source/WebCore/css/makeprop.pl:956 > > + print SHORTHANDS_CPP " return StylePropertyShorthand(CSSProperty" . $nameToId{$name} . ", " . $lowercaseId . "Properties, WTF_ARRAY_LENGTH(" . $lowercaseId . "Properties));\n"; > > Seems like we could avoid this WTF_ARRAY_LENGTH if we made the constructor a > template that takes an array and deduces its length, like > StringBuilder::appendLiteral, for example. Anything that reduces the amount > of generated code and puts more of the code in normal C++ header files seems > like a win to me. To state the obvious, we want the code generator to > generate things that need to be repeated but make the actual code generated > as minimal as we can. I made the suggested change before landing.
Comment on attachment 244773 [details] Patch Clearing flags on attachment: 244773 Committed r178586: <http://trac.webkit.org/changeset/178586>
All reviewed patches have been landed. Closing bug.