Bug 103703 - [CSS Grid Layout] Align the grid track handling code with the specification's production rules
Summary: [CSS Grid Layout] Align the grid track handling code with the specification's...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Julien Chaffraix
URL:
Keywords:
Depends on:
Blocks: 103311
  Show dependency treegraph
 
Reported: 2012-11-29 18:35 PST by Julien Chaffraix
Modified: 2012-11-30 16:02 PST (History)
8 users (show)

See Also:


Attachments
Proposed refactoring. (7.84 KB, patch)
2012-11-29 18:49 PST, Julien Chaffraix
no flags Details | Formatted Diff | Diff
Updated refactoring: Fixed the mac build. (9.23 KB, patch)
2012-11-30 07:57 PST, Julien Chaffraix
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2012-11-29 18:35:42 PST
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).
Comment 1 Julien Chaffraix 2012-11-29 18:49:10 PST
Created attachment 176884 [details]
Proposed refactoring.
Comment 2 Build Bot 2012-11-29 21:43:00 PST
Comment on attachment 176884 [details]
Proposed refactoring.

Attachment 176884 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15057212
Comment 3 Julien Chaffraix 2012-11-30 07:57:43 PST
Created attachment 176969 [details]
Updated refactoring: Fixed the mac build.
Comment 4 Julien Chaffraix 2012-11-30 16:01:57 PST
Landed the change manually in http://trac.webkit.org/changeset/136294 as the commit queue is stuck.