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

Unified Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 148293008: [CSS Grid Layout] Add support to place items using named grid lines (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing v3. Fix for Debug bot Created 6 years, 7 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 | « Source/core/css/resolver/StyleBuilderConverter.cpp ('k') | Source/core/rendering/style/GridCoordinate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index d03868a8a58b5ac6f70bb04ac393ae8569d0cda2..2ebfdca92953d3be6c553915a7f5c749a96cb4c3 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -323,7 +323,16 @@ void StyleBuilderFunctions::applyValueCSSPropertyGridTemplateAreas(StyleResolver
}
CSSGridTemplateAreasValue* gridTemplateAreasValue = toCSSGridTemplateAreasValue(value);
- state.style()->setNamedGridArea(gridTemplateAreasValue->gridAreaMap());
+ const NamedGridAreaMap& newNamedGridAreas = gridTemplateAreasValue->gridAreaMap();
+
+ NamedGridLinesMap namedGridColumnLines = state.style()->namedGridColumnLines();
+ NamedGridLinesMap namedGridRowLines = state.style()->namedGridRowLines();
+ StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea(newNamedGridAreas, namedGridColumnLines, ForColumns);
+ StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea(newNamedGridAreas, namedGridRowLines, ForRows);
+ state.style()->setNamedGridColumnLines(namedGridColumnLines);
+ state.style()->setNamedGridRowLines(namedGridRowLines);
+
+ state.style()->setNamedGridArea(newNamedGridAreas);
state.style()->setNamedGridAreaRowCount(gridTemplateAreasValue->rowCount());
state.style()->setNamedGridAreaColumnCount(gridTemplateAreasValue->columnCount());
}
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.cpp ('k') | Source/core/rendering/style/GridCoordinate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698