Index: third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
index a9d80d7ebbd8775def2668b9adf41c2c2b336d45..24a85f06f9a6ba3421ee12933d25d8d92f15a99c 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
@@ -692,6 +692,8 @@ void LayoutGrid::computeTrackSizesForIndefiniteSize( |
computeUsedBreadthOfGridTracks(direction, sizingData, minIntrinsicSize, |
maxIntrinsicSize); |
+ // Free Space is always 0 for indefinite sizing computation. |
+ sizingData.freeSpace(direction) = LayoutUnit(); |
svillar
2016/10/17 08:20:33
I disagree with this change for 2 reasons:
1) the
jfernandez
2016/10/17 08:43:54
Well, since we are initializing it to 0, we are ge
svillar
2016/10/17 09:13:19
I understand but what you're doing here is exactly
|
size_t numberOfTracks = direction == ForColumns |
? sizingData.columnTracks.size() |
@@ -3212,7 +3214,10 @@ ContentAlignmentData LayoutGrid::computeContentPositionAndDistributionOffset( |
OverflowAlignment overflow = |
isRowAxis ? styleRef().justifyContentOverflowAlignment() |
: styleRef().alignContentOverflowAlignment(); |
- if (availableFreeSpace <= 0 && overflow == OverflowAlignmentSafe) |
+ // TODO (lajava): Default value for overflow isn't exaclty as 'unsafe'. |
+ // https://drafts.csswg.org/css-align/#overflow-values |
+ if (availableFreeSpace == 0 || |
+ (availableFreeSpace < 0 && overflow == OverflowAlignmentSafe)) |
return {LayoutUnit(), LayoutUnit()}; |
switch (position) { |