WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
150674
[css-grid] Fix fr tracks sizing under min|max-size constraints
https://bugs.webkit.org/show_bug.cgi?id=150674
Summary
[css-grid] Fix fr tracks sizing under min|max-size constraints
Sergio Villar Senin
Reported
2015-10-29 09:34:51 PDT
Specs say: "When the grid container is being sized under a min-content constraint, a track with a flexible min track sizing function is treated as if its min track sizing function was min-content for the purposes of this step" We are not doing it, so in the end we're sizing them as any other fr track. This means that the size of the track will be used the max-content of the items inside the track instead of the min-content. For more info:
https://lists.w3.org/Archives/Public/www-style/2015May/0116.html
Attachments
Patch
(17.80 KB, patch)
2016-11-08 07:32 PST
,
Sergio Villar Senin
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Sergio Villar Senin
Comment 1
2016-11-08 06:57:30 PST
The text mentioned in
comment #1
is no longer included in the specs. However there is a new paragraph now which says: "If using this flex fraction would cause the grid to be smaller than the grid container’s min-width/height (or larger than the grid container’s max-width/height), then redo this step, treating the free space as definite and the available grid space as equal to the grid container’s content box size when it’s sized to its min-width/height (max-width/height)."
Sergio Villar Senin
Comment 2
2016-11-08 07:32:10 PST
Created
attachment 294159
[details]
Patch
Darin Adler
Comment 3
2016-11-08 09:12:14 PST
Comment on
attachment 294159
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=294159&action=review
> Source/WebCore/rendering/RenderGrid.cpp:805 > + computeFlexSizedTracksGrowth(direction, sizingData.sizingOperation, tracks, flexibleSizedTracksIndex, flexFraction, increments, totalGrowth);
We should consider making this function have return values instead of out arguments in the future.
> Source/WebCore/rendering/RenderGrid.cpp:812 > + auto minSize = computeContentLogicalHeight(MinSize, style().logicalMinHeight(), LayoutUnit(-1)); > + auto maxSize = computeContentLogicalHeight(MaxSize, style().logicalMaxHeight(), LayoutUnit(-1));
The use of -1 as a magic value here and elsewhere is quite ugly.
Sergio Villar Senin
Comment 4
2016-11-10 02:11:31 PST
Committed
r208531
: <
http://trac.webkit.org/changeset/208531
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug