Currently our parsing, style resolution and computed style implementation of grid-definition-{row|column} are pretty flat. The specification defines 4 production rules: <track-list> => [ [ <string> ]* <track-group> [ <string> ]* ]+ | none <track-group> => <track-minmax> | [ repeat( <positive-integer> , [ [ <string> ]* <track-minmax> [ <string> ]* ]+ ) ] <track-minmax> => minmax( <track-breadth> , <track-breadth> ) | auto | <track-breadth> <track-breadth> => <length> | <percentage> | <fraction> | min-content | max-content Aligning our implementation with that would make the code more readable and would be easier to add support for more of the syntax (minmax being my goal).
Created attachment 176884 [details] Proposed refactoring.
Comment on attachment 176884 [details] Proposed refactoring. Attachment 176884 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15057212
Created attachment 176969 [details] Updated refactoring: Fixed the mac build.
Landed the change manually in http://trac.webkit.org/changeset/136294 as the commit queue is stuck.