| 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 ae4ba1fd6cbb8a3239efef6b9faa7b805dbb654d..471af30929ff5d6420635f39064832ff3af47e3e 100644
|
| --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| @@ -818,6 +818,16 @@ static void addValuesForNamedGridLinesAtIndex(OrderedNamedLinesCollector& collec
|
| list.append(*lineNames);
|
| }
|
|
|
| +static CSSValue* valueForGridTrackSizeList(GridTrackSizingDirection direction, const ComputedStyle& style)
|
| +{
|
| + const Vector<GridTrackSize>& autoTrackSizes = direction == ForColumns ? style.gridAutoColumns() : style.gridAutoRows();
|
| +
|
| + CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| + for (auto& trackSize : autoTrackSizes)
|
| + list->append(*specifiedValueForGridTrackSize(trackSize, style));
|
| + return list;
|
| +}
|
| +
|
| static CSSValue* valueForGridTrackList(GridTrackSizingDirection direction, const LayoutObject* layoutObject, const ComputedStyle& style)
|
| {
|
| bool isRowAxis = direction == ForColumns;
|
| @@ -1967,14 +1977,14 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return list;
|
| }
|
| // Specs mention that getComputedStyle() should return the used value of the property instead of the computed
|
| - // one for grid-definition-{rows|columns} but not for the grid-auto-{rows|columns} as things like
|
| + // one for grid-template-{rows|columns} but not for the grid-auto-{rows|columns} as things like
|
| // grid-auto-columns: 2fr; cannot be resolved to a value in pixels as the '2fr' means very different things
|
| // depending on the size of the explicit grid or the number of implicit tracks added to the grid. See
|
| // http://lists.w3.org/Archives/Public/www-style/2013Nov/0014.html
|
| case CSSPropertyGridAutoColumns:
|
| - return specifiedValueForGridTrackSize(style.gridAutoColumns(), style);
|
| + return valueForGridTrackSizeList(ForColumns, style);
|
| case CSSPropertyGridAutoRows:
|
| - return specifiedValueForGridTrackSize(style.gridAutoRows(), style);
|
| + return valueForGridTrackSizeList(ForRows, style);
|
|
|
| case CSSPropertyGridTemplateColumns:
|
| return valueForGridTrackList(ForColumns, layoutObject, style);
|
|
|