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

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: Small fix in add/removeChild to avoid dirtying the grid in stack 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
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

Powered by Google App Engine
This is Rietveld 408576698