Bug 130920

Summary: [CSS Grid Layout] The 'auto' height must be adapted to the item's margin.
Product: WebKit Reporter: Javier Fernandez <jfernandez>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, esprehn+autocc, glenn, hyatt, kondapallykalyan, rego, svillar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test cases to reproduce the issue.
none
Screenshot of the issue.
none
Patch none

Description Javier Fernandez 2014-03-28 16:59:17 PDT
When using 'auto' on grid-template-{rows-columns} properties, the vertical margin should be taken into account when computing the item's logical height, so the grid container's height is adapted accordingly.
Comment 1 Javier Fernandez 2014-03-28 17:00:35 PDT
Created attachment 228095 [details]
Test cases to reproduce the issue.
Comment 2 Javier Fernandez 2014-03-28 17:02:03 PDT
Created attachment 228096 [details]
Screenshot of the issue.
Comment 3 Javier Fernandez 2014-03-28 17:12:42 PDT
Created attachment 228097 [details]
Patch
Comment 4 Darin Adler 2014-03-28 22:13:54 PDT
Comment on attachment 228097 [details]
Patch

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

> LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-expected.txt:17
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS
> +PASS

I’m not really happy with these check-layout tests. Could we make this a reference test instead perhaps?
Comment 5 WebKit Commit Bot 2014-03-28 22:44:34 PDT
Comment on attachment 228097 [details]
Patch

Clearing flags on attachment: 228097

Committed r166450: <http://trac.webkit.org/changeset/166450>
Comment 6 WebKit Commit Bot 2014-03-28 22:44:38 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Javier Fernandez 2014-03-29 14:03:03 PDT
(In reply to comment #4)
> (From update of attachment 228097 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=228097&action=review
> 
> > LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-expected.txt:17
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> > +PASS
> 
> I’m not really happy with these check-layout tests. Could we make this a reference test instead perhaps?

sure, actually I agree with your point.

I've filed bug #130935 to do not forget.