| Index: Source/core/rendering/RenderGrid.cpp
|
| diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp
|
| index 3a9e0a728995d5f6299b9e17e1de1a1cefc964eb..2fd00bdcd12d9b54421c9495005d1808fee93748 100644
|
| --- a/Source/core/rendering/RenderGrid.cpp
|
| +++ b/Source/core/rendering/RenderGrid.cpp
|
| @@ -975,7 +975,6 @@ size_t RenderGrid::resolveNamedGridLinePositionFromStyle(const GridPosition& pos
|
|
|
| size_t RenderGrid::resolveGridPositionFromStyle(const GridPosition& position, GridPositionSide side) const
|
| {
|
| - // FIXME: Handle other values for grid-{row,column} like ranges or line names.
|
| switch (position.type()) {
|
| case ExplicitPosition: {
|
| ASSERT(position.integerPosition());
|
| @@ -997,8 +996,24 @@ size_t RenderGrid::resolveGridPositionFromStyle(const GridPosition& position, Gr
|
| return adjustGridPositionForSide(endOfTrack - resolvedPosition, side);
|
| }
|
| case NamedGridAreaPosition:
|
| - // FIXME: Support resolving named grid area (crbug.com/258092).
|
| + {
|
| + NamedGridAreaMap::const_iterator it = style()->namedGridArea().find(position.namedGridLine());
|
| + // Unknown grid area should have been computed to 'auto' by now.
|
| + ASSERT(it != style()->namedGridArea().end());
|
| + const GridCoordinate& gridAreaCoordinate = it->value;
|
| + switch (side) {
|
| + case ColumnStartSide:
|
| + return gridAreaCoordinate.columns.initialPositionIndex;
|
| + case ColumnEndSide:
|
| + return gridAreaCoordinate.columns.finalPositionIndex;
|
| + case RowStartSide:
|
| + return gridAreaCoordinate.rows.initialPositionIndex;
|
| + case RowEndSide:
|
| + return gridAreaCoordinate.rows.finalPositionIndex;
|
| + }
|
| + ASSERT_NOT_REACHED();
|
| return 0;
|
| + }
|
| case AutoPosition:
|
| case SpanPosition:
|
| // 'auto' and span depend on the opposite position for resolution (e.g. grid-row: auto / 1 or grid-column: span 3 / "myHeader").
|
|
|