Index: Source/core/css/ComputedStyleCSSValueMapping.cpp |
diff --git a/Source/core/css/ComputedStyleCSSValueMapping.cpp b/Source/core/css/ComputedStyleCSSValueMapping.cpp |
index a01987a08007707275c5b9af054df2ca4ca30c90..c33ed00f3bd4356c75fba8f2900e25381beff7f2 100644 |
--- a/Source/core/css/ComputedStyleCSSValueMapping.cpp |
+++ b/Source/core/css/ComputedStyleCSSValueMapping.cpp |
@@ -609,10 +609,15 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForGridTrackList(GridTrackSizingDir |
// so we'll have more trackPositions than trackSizes as the latter only contain the explicit grid. |
ASSERT(trackPositions.size() - 1 >= trackSizes.size()); |
- for (size_t i = 0; i < trackPositions.size() - 1; ++i) { |
+ size_t i; |
+ LayoutUnit gutterSize = toLayoutGrid(layoutObject)->guttersSize(direction, 2); |
+ for (i = 0; i < trackPositions.size() - 2; ++i) { |
addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, i, *list); |
- list->append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i], style)); |
+ list->append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i] - gutterSize, style)); |
} |
+ // Last track line does not have any gutter. |
+ addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, i, *list); |
+ list->append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i], style)); |
insertionIndex = trackPositions.size() - 1; |
} else { |
for (size_t i = 0; i < trackSizes.size(); ++i) { |
@@ -1732,6 +1737,12 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID |
} |
return CSSGridTemplateAreasValue::create(style.namedGridArea(), style.namedGridAreaRowCount(), style.namedGridAreaColumnCount()); |
+ case CSSPropertyGridColumnGap: |
+ return zoomAdjustedPixelValueForLength(style.gridColumnGap(), style); |
+ case CSSPropertyGridRowGap: |
+ return zoomAdjustedPixelValueForLength(style.gridRowGap(), style); |
+ case CSSPropertyGridGap: |
+ return valuesForShorthandProperty(gridGapShorthand(), style, layoutObject, styledNode, allowVisitedStyle); |
case CSSPropertyHeight: |
if (layoutObject) { |