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

Unified Diff: Source/core/css/resolver/StyleBuilderConverter.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.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleBuilderConverter.cpp
diff --git a/Source/core/css/resolver/StyleBuilderConverter.cpp b/Source/core/css/resolver/StyleBuilderConverter.cpp
index 78cf2176280d254986e75953dfbcca8ed67df1a3..392aefac446052c16a5052f9ca37fb2557b25c64 100644
--- a/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -104,7 +104,6 @@ EGlyphOrientation StyleBuilderConverter::convertGlyphOrientation(StyleResolverSt
return GO_270DEG;
}
-
GridPosition StyleBuilderConverter::convertGridPosition(StyleResolverState&, CSSValue* value)
{
// We accept the specification's grammar:
@@ -210,6 +209,24 @@ bool StyleBuilderConverter::convertGridTrackList(CSSValue* value, Vector<GridTra
return true;
}
+void StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap& namedGridAreas, NamedGridLinesMap& namedGridLines, GridTrackSizingDirection direction)
+{
+ NamedGridAreaMap::const_iterator end = namedGridAreas.end();
+ for (NamedGridAreaMap::const_iterator it = namedGridAreas.begin(); it != end; ++it) {
+ GridSpan areaSpan = direction == ForRows ? it->value.rows : it->value.columns;
+ {
+ NamedGridLinesMap::AddResult startResult = namedGridLines.add(it->key + "-start", Vector<size_t>());
+ startResult.storedValue->value.append(areaSpan.resolvedInitialPosition.toInt());
+ std::sort(startResult.storedValue->value.begin(), startResult.storedValue->value.end());
+ }
+ {
+ NamedGridLinesMap::AddResult endResult = namedGridLines.add(it->key + "-end", Vector<size_t>());
+ endResult.storedValue->value.append(areaSpan.resolvedFinalPosition.toInt() + 1);
+ std::sort(endResult.storedValue->value.begin(), endResult.storedValue->value.end());
+ }
+ }
+}
+
Length StyleBuilderConverter::convertLength(StyleResolverState& state, CSSValue* value)
{
CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698