Index: Source/core/css/CSSComputedStyleDeclaration.cpp |
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp |
index 733191a5147fe737c3005701386bf55065a65242..e6f345eb71784385e0b076e96bf3f4195739602b 100644 |
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp |
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp |
@@ -1960,9 +1960,43 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu |
} |
return list.release(); |
} |
- case CSSPropertyGridAutoFlow: |
- return cssValuePool().createValue(style->gridAutoFlow()); |
+ case CSSPropertyGridAutoFlow: { |
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
+ switch (style->gridAutoFlow()) { |
+ case AutoFlowRow: |
+ case AutoFlowRowDense: |
+ list->append(cssValuePool().createIdentifierValue(CSSValueRow)); |
+ break; |
+ case AutoFlowColumn: |
+ case AutoFlowColumnDense: |
+ list->append(cssValuePool().createIdentifierValue(CSSValueColumn)); |
+ break; |
+ case AutoFlowStackRow: |
+ case AutoFlowStackColumn: |
+ list->append(cssValuePool().createIdentifierValue(CSSValueStack)); |
+ break; |
+ default: |
+ ASSERT_NOT_REACHED(); |
+ } |
+ |
+ switch (style->gridAutoFlow()) { |
+ case AutoFlowRowDense: |
+ case AutoFlowColumnDense: |
+ list->append(cssValuePool().createIdentifierValue(CSSValueDense)); |
+ break; |
+ case AutoFlowStackRow: |
+ list->append(cssValuePool().createIdentifierValue(CSSValueRow)); |
+ break; |
+ case AutoFlowStackColumn: |
+ list->append(cssValuePool().createIdentifierValue(CSSValueColumn)); |
+ break; |
+ default: |
+ // Do nothing. |
+ break; |
+ } |
+ return list.release(); |
+ } |
// 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 |
// grid-auto-columns: 2fr; cannot be resolved to a value in pixels as the '2fr' means very different things |