Bug 79151

Summary: Implement limited parsing of -webkit-grid-column and -webkit-grid-row
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: CSSAssignee: Julien Chaffraix <jchaffraix>
Status: RESOLVED FIXED    
Severity: Normal CC: macpherson, menard, ojan, rakuco, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 60731    
Attachments:
Description Flags
Early patch to discuss the naming.
none
Fully working patch.
none
Updated patch: fixed the Mac build.
none
Rebaselined XCode file. ojan: review+

Description Julien Chaffraix 2012-02-21 14:46:42 PST
http://dev.w3.org/csswg/css3-grid-align/#grid-row-property
http://dev.w3.org/csswg/css3-grid-align/#grid-column-property

This is a first step into properly parsing them. We limit the syntax to <integer> | 'auto' to have a manageable size for the change.

Note: there has been some proposal about renaming them but for now no one backed this change so we will likely have to rename them down the road.
Comment 1 Julien Chaffraix 2012-02-21 14:59:55 PST
Created attachment 128050 [details]
Early patch to discuss the naming.
Comment 2 Tony Chang 2012-02-22 13:43:11 PST
Comment on attachment 128050 [details]
Early patch to discuss the naming.

View in context: https://bugs.webkit.org/attachment.cgi?id=128050&action=review

The naming seems fine to me.

> Source/WebCore/ChangeLog:12
> +        -webkit-{row|column} := <integer> | 'auto'

-webkit-grid-{row|column}
Comment 3 Julien Chaffraix 2012-02-23 12:16:51 PST
Created attachment 128530 [details]
Fully working patch.
Comment 4 Julien Chaffraix 2012-02-23 15:47:43 PST
Comment on attachment 128530 [details]
Fully working patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=128530&action=review

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:920
> +static PassRefPtr<CSSValue> valueForGridPosition(const Length& position, const RenderStyle* style, CSSValuePool* cssValuePool)

Looks like the unused parameter |style| is making the mac EWS sad. I will update the patch to make them happy.
Comment 5 Julien Chaffraix 2012-02-23 18:17:44 PST
Created attachment 128625 [details]
Updated patch: fixed the Mac build.
Comment 6 Julien Chaffraix 2012-02-24 12:47:23 PST
Created attachment 128786 [details]
Rebaselined XCode file.
Comment 7 Ojan Vafai 2012-02-24 14:14:31 PST
Comment on attachment 128786 [details]
Rebaselined XCode file.

View in context: https://bugs.webkit.org/attachment.cgi?id=128786&action=review

Please merge the JS file into the html test before committing.

> LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html:26
> +<script src="resources/grid-item-column-row-get-set.js"></script>

I'd rather you inline the JS here. Having multiple files for a test is a pain.
Comment 8 Julien Chaffraix 2012-02-24 15:25:06 PST
Committed r108855: <http://trac.webkit.org/changeset/108855>