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

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: 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
Index: Source/core/rendering/style/GridCoordinate.h
diff --git a/Source/core/rendering/style/GridCoordinate.h b/Source/core/rendering/style/GridCoordinate.h
index 196a7e3fee07d7d03b6d3912483e4392a23b790d..951c259c5eebada5ec8772bc287ddba4fd09ee7c 100644
--- a/Source/core/rendering/style/GridCoordinate.h
+++ b/Source/core/rendering/style/GridCoordinate.h
@@ -155,6 +155,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;
};
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/core/rendering/style/GridResolvedPosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698