Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Unified Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 333563003: [CSS Grid Layout] Update grid-auto-flow to the new syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Attempt 2 to fix win_blink_rel Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/ietestcenter/css3/grid/grid-column-003.htm ('k') | Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 48b93f72daa66b30d55c5cc925e46be674447560..220aaeca9db10b4c3cb630c8cc3b7cd8a771d6f2 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -1958,9 +1958,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
« no previous file with comments | « LayoutTests/ietestcenter/css3/grid/grid-column-003.htm ('k') | Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698