Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
index 4b9e74e5be2fa2d3b5f5857f549740976cb546cf..e4083c36ea9b12d815c37ec2f3bccd9b77f143ff 100644 |
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
@@ -644,18 +644,20 @@ static CSSValue* valueForGridTrackList(GridTrackSizingDirection direction, const |
CSSValueList* list = CSSValueList::createSpaceSeparated(); |
size_t insertionIndex; |
if (isLayoutGrid) { |
- const Vector<LayoutUnit>& trackPositions = direction == ForColumns ? toLayoutGrid(layoutObject)->columnPositions() : toLayoutGrid(layoutObject)->rowPositions(); |
+ const auto* grid = toLayoutGrid(layoutObject); |
+ const Vector<LayoutUnit>& trackPositions = direction == ForColumns ? grid->columnPositions() : grid->rowPositions(); |
// There are at least #tracks + 1 grid lines (trackPositions). Apart from that, the grid container can generate implicit grid tracks, |
// so we'll have more trackPositions than trackSizes as the latter only contain the explicit grid. |
ASSERT(trackPositions.size() - 1 >= trackSizes.size()); |
size_t i; |
- LayoutUnit gutterSize = toLayoutGrid(layoutObject)->guttersSize(direction, 2); |
+ LayoutUnit gutterSize = grid->guttersSize(direction, 2); |
+ LayoutUnit offsetBetweenTracks = grid->offsetBetweenTracks(direction); |
for (i = 0; i < trackPositions.size() - 2; ++i) { |
addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, i, *list); |
- list->append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i] - gutterSize, style)); |
+ list->append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i] - gutterSize - offsetBetweenTracks, style)); |
} |
- // Last track line does not have any gutter. |
+ // Last track line does not have any gutter or distribution offset. |
addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, i, *list); |
list->append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i], style)); |
insertionIndex = trackPositions.size() - 1; |