RESOLVED FIXED 140556
Generate shorthandForProperty() implementation from CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=140556
Summary Generate shorthandForProperty() implementation from CSSPropertyNames.in
Chris Dumez
Reported 2015-01-16 12:29:12 PST
Generate shorthandForProperty() implementation from CSSPropertyNames.in. This is just a big switch() statement calling the right StylePropertyShorthand factory function for a given CSSPropertyID.
Attachments
Patch (7.60 KB, patch)
2015-01-16 12:54 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2015-01-16 12:54:12 PST
Chris Dumez
Comment 2 2015-01-16 16:55:29 PST
Comment on attachment 244791 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=244791&action=review > Source/WebCore/css/makeprop.pl:977 > +# FIXME: CSSPropertyFont is currently an exception. It is hard-coded here I filed https://bugs.webkit.org/show_bug.cgi?id=140577 fo this.
Darin Adler
Comment 3 2015-01-17 08:12:09 PST
Comment on attachment 244791 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=244791&action=review Some day we might want a table instead of a switch, if that proves to have better performance. If we know the numeric values of all the CSS property constants then we can just emit an array. > Source/WebCore/css/makeprop.pl:964 > + static NeverDestroyed<StylePropertyShorthand> emptyShorthand; Seems like this could go right after the default: label instead of at the top of the function. Not sure it’s better, though. Or the empty shorthand could be a function, just like all the specific shorthands, rather than inlined here.
WebKit Commit Bot
Comment 4 2015-01-17 08:54:32 PST
Comment on attachment 244791 [details] Patch Clearing flags on attachment: 244791 Committed r178626: <http://trac.webkit.org/changeset/178626>
WebKit Commit Bot
Comment 5 2015-01-17 08:54:36 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.