|Summary:||[css-grid] Fix behavior of flexible track breadths|
|Product:||WebKit||Reporter:||Manuel Rego Casasnovas <rego>|
|Component:||Layout and Rendering||Assignee:||Manuel Rego Casasnovas <rego>|
|Severity:||Normal||CC:||commit-queue, jfernandez, rego, simon.fraser, svillar|
|Version:||WebKit Nightly Build|
|Bug Depends on:|
Description Manuel Rego Casasnovas 2016-05-18 04:46:32 PDT
There have been some changes on the spec so we need to update the implementation. This bug is about 2 changes that are interrelated. 1) First change  is from January 2015 : "When appearing outside a minmax() notation, implies an automatic minimum (i.e. ''minmax(auto, <flex>)'')." Right now, we're considering that "1fr" is equivalent to "minmax(1fr, 1fr)". But it should be "minmax(auto, 1fr)". 2) Another change  from the spec that we should implement. "fr" should be invalid if it's used in the min slot of minmax(). The new syntax on the spec is : <track-size> = <track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) <inflexible-breadth> = <length> | <percentage> | min-content | max-content | auto This means that a declaration like "grid-column: minmax(1fr, 100px);" should be considered invalid. As you can see both changes are very related. It would be strange that we're rejecting "fr" explicitly on the min slot (e.g. "minmax(1fr, 100px)"), but accepting it implicitly as "1fr" would behave like "minmax(1fr, 1fr)" instead of "minmax(auto, 1fr)". BTW, this has been already fixed in Blink: https://codereview.chromium.org/1979603002/  https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-flex  https://github.com/w3c/csswg-drafts/commit/129f2c1ad684e47ef85900f8e156efe07a3f13d6  https://github.com/w3c/csswg-drafts/commit/4040ba7fa068905f7fe1c1bf35d665a2062acafa  https://drafts.csswg.org/css-grid/#typedef-track-size
Comment 2 Sergio Villar Senin 2016-05-24 01:05:35 PDT
Comment on attachment 279473 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=279473&action=review Awesome. Just some minor nits here and there. > Source/WebCore/ChangeLog:10 > + 1) Flex sizes are invalid on the min slot of minmax(). Nit: "min track sizing function" > Source/WebCore/ChangeLog:18 > + adding a new type of restriction "InflexibleSizeOnly". I prefer this to be inlined bellow in the changed files list. > Source/WebCore/ChangeLog:28 > + RenderGrid::gridTrackSize(); Ditto. > Source/WebCore/rendering/RenderGrid.cpp:751 > + // if the track had a flex size directly (e.g. "1fr"), the spec says that in this case it implies an automatic minimum. " if the track had a flex size directly" sounds weird to me, could you rephrase it? > LayoutTests/ChangeLog:8 > + The patch includes new test cases checking specifically these 2 issues. "checking specifically these 2 issues" note that you have not mentioned any issue in this ChangeLog, it only makes sense when reading the WebCore one, so perhaps it's better to add a description or completely wipe out that sentence (and adapting the following ones)
Comment 4 Manuel Rego Casasnovas 2016-05-24 01:25:10 PDT
Comment on attachment 279636 [details] Patch Thanks for the review. Applied suggested changes.
Comment 5 WebKit Commit Bot 2016-05-24 01:54:06 PDT
Comment on attachment 279636 [details] Patch Clearing flags on attachment: 279636 Committed r201325: <http://trac.webkit.org/changeset/201325>
Comment 6 WebKit Commit Bot 2016-05-24 01:54:10 PDT
All reviewed patches have been landed. Closing bug.