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

Unified Diff: Source/core/rendering/style/GridCoordinate.h

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: Implementation following specs 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
Index: Source/core/rendering/style/GridCoordinate.h
diff --git a/Source/core/rendering/style/GridCoordinate.h b/Source/core/rendering/style/GridCoordinate.h
index b64eea45ed46f38899b46740819812af37660fb0..4fb49abeafca59233ca16707fc61d36457d74485 100644
--- a/Source/core/rendering/style/GridCoordinate.h
+++ b/Source/core/rendering/style/GridCoordinate.h
@@ -156,6 +156,22 @@ struct GridCoordinate {
return !(*this == o);
}
+ GridResolvedPosition positionForSide(GridPositionSide side) const
+ {
+ switch (side) {
+ case ColumnStartSide:
+ return columns.resolvedInitialPosition;
+ case ColumnEndSide:
+ return columns.resolvedFinalPosition;
+ case RowStartSide:
+ return rows.resolvedInitialPosition;
+ case RowEndSide:
+ return rows.resolvedFinalPosition;
+ }
+ ASSERT_NOT_REACHED();
+ return 0;
+ }
+
GridSpan columns;
GridSpan rows;
};

Powered by Google App Engine
This is Rietveld 408576698