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 add326d5be4e593fadf9069bce728081c3f0cdd4..6d4a77e6ac695658d08d2e835b85cdc2ce4d79bd 100644 |
--- a/third_party/WebKit/Source/core/style/GridResolvedPosition.h |
+++ b/third_party/WebKit/Source/core/style/GridResolvedPosition.h |
@@ -26,73 +26,12 @@ enum GridTrackSizingDirection { |
ForRows |
}; |
-// 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. |
+// This is a utility class with all the code related to grid items positions resolution. |
+// TODO(rego): Rename class to GridPositionsResolver. |
class GridResolvedPosition { |
DISALLOW_NEW(); |
public: |
- GridResolvedPosition(size_t position) |
- : m_integerPosition(position) |
- { |
- } |
- |
- GridResolvedPosition& operator*() |
- { |
- return *this; |
- } |
- |
- GridResolvedPosition& operator++() |
- { |
- m_integerPosition++; |
- return *this; |
- } |
- |
- bool operator==(const GridResolvedPosition& other) const |
- { |
- return m_integerPosition == other.m_integerPosition; |
- } |
- |
- bool operator!=(const GridResolvedPosition& other) const |
- { |
- return m_integerPosition != other.m_integerPosition; |
- } |
- |
- bool operator<(const GridResolvedPosition& other) const |
- { |
- return m_integerPosition < other.m_integerPosition; |
- } |
- |
- bool operator>(const GridResolvedPosition& other) const |
- { |
- return m_integerPosition > other.m_integerPosition; |
- } |
- |
- bool operator<=(const GridResolvedPosition& other) const |
- { |
- return m_integerPosition <= other.m_integerPosition; |
- } |
- |
- bool operator>=(const GridResolvedPosition& other) const |
- { |
- return m_integerPosition >= other.m_integerPosition; |
- } |
- |
- size_t toInt() const |
- { |
- return m_integerPosition; |
- } |
- |
- GridResolvedPosition next() const |
- { |
- 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&); |
@@ -101,12 +40,9 @@ public: |
static GridPositionSide initialPositionSide(GridTrackSizingDirection); |
static GridPositionSide finalPositionSide(GridTrackSizingDirection); |
- static GridSpan resolveGridPositionsFromAutoPlacementPosition(const ComputedStyle&, const LayoutBox&, GridTrackSizingDirection, const GridResolvedPosition&); |
+ static GridSpan resolveGridPositionsFromAutoPlacementPosition(const ComputedStyle&, const LayoutBox&, GridTrackSizingDirection, size_t resolvedInitialPosition); |
static GridSpan resolveGridPositionsFromStyle(const ComputedStyle&, const LayoutBox&, GridTrackSizingDirection); |
-private: |
- |
- size_t m_integerPosition; |
}; |
} // namespace blink |