| Index: third_party/WebKit/Source/core/style/GridResolvedPosition.h
|
| diff --git a/third_party/WebKit/Source/core/style/GridResolvedPosition.h b/third_party/WebKit/Source/core/style/GridResolvedPosition.h
|
| index 184d312ccdbe60f2a31f8dec2b3a2933f63f14c0..4ac11e70dcb3918d2610412d7ab89548c94fe420 100644
|
| --- a/third_party/WebKit/Source/core/style/GridResolvedPosition.h
|
| +++ b/third_party/WebKit/Source/core/style/GridResolvedPosition.h
|
| @@ -26,24 +26,11 @@ enum GridTrackSizingDirection {
|
| ForRows
|
| };
|
|
|
| -// This class represents an index into one of the dimensions of the grid array.
|
| +// This class represents a line index into one of the dimensions of the grid array.
|
| // Wraps a size_t integer just for the purpose of knowing what we manipulate in the grid code.
|
| class GridResolvedPosition {
|
| DISALLOW_NEW();
|
| public:
|
| - static GridResolvedPosition adjustGridPositionForAfterEndSide(size_t resolvedPosition)
|
| - {
|
| - return resolvedPosition ? GridResolvedPosition(resolvedPosition - 1) : GridResolvedPosition(0);
|
| - }
|
| -
|
| - static GridResolvedPosition adjustGridPositionForSide(size_t resolvedPosition, GridPositionSide side)
|
| - {
|
| - // An item finishing on the N-th line belongs to the N-1-th cell.
|
| - if (side == ColumnEndSide || side == RowEndSide)
|
| - return adjustGridPositionForAfterEndSide(resolvedPosition);
|
| -
|
| - return GridResolvedPosition(resolvedPosition);
|
| - }
|
|
|
| static bool isValidNamedLineOrArea(const String& lineName, const ComputedStyle&, GridPositionSide);
|
| static GridPositionSide initialPositionSide(GridTrackSizingDirection);
|
| @@ -61,14 +48,6 @@ public:
|
| {
|
| }
|
|
|
| - GridResolvedPosition(const GridPosition& position, GridPositionSide side)
|
| - {
|
| - ASSERT(position.integerPosition());
|
| - size_t integerPosition = position.integerPosition() - 1;
|
| -
|
| - m_integerPosition = adjustGridPositionForSide(integerPosition, side).toInt();
|
| - }
|
| -
|
| GridResolvedPosition& operator*()
|
| {
|
| return *this;
|
| @@ -120,6 +99,11 @@ public:
|
| return GridResolvedPosition(m_integerPosition + 1);
|
| }
|
|
|
| + GridResolvedPosition prev() const
|
| + {
|
| + return GridResolvedPosition(m_integerPosition > 0 ? m_integerPosition - 1 : 0);
|
| + }
|
| +
|
| static size_t explicitGridColumnCount(const ComputedStyle&);
|
| static size_t explicitGridRowCount(const ComputedStyle&);
|
|
|
|
|