| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GridResolvedPosition_h | 5 #ifndef GridResolvedPosition_h |
| 6 #define GridResolvedPosition_h | 6 #define GridResolvedPosition_h |
| 7 | 7 |
| 8 #include "core/rendering/style/GridPosition.h" | 8 #include "core/rendering/style/GridPosition.h" |
| 9 | 9 |
| 10 namespace WebCore { | 10 namespace WebCore { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 { | 67 { |
| 68 m_integerPosition++; | 68 m_integerPosition++; |
| 69 return *this; | 69 return *this; |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool operator==(const GridResolvedPosition& other) const | 72 bool operator==(const GridResolvedPosition& other) const |
| 73 { | 73 { |
| 74 return m_integerPosition == other.m_integerPosition; | 74 return m_integerPosition == other.m_integerPosition; |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool operator!=(const GridResolvedPosition& other) const |
| 78 { |
| 79 return m_integerPosition != other.m_integerPosition; |
| 80 } |
| 81 |
| 77 bool operator<(const GridResolvedPosition& other) const | 82 bool operator<(const GridResolvedPosition& other) const |
| 78 { | 83 { |
| 79 return m_integerPosition < other.m_integerPosition; | 84 return m_integerPosition < other.m_integerPosition; |
| 80 } | 85 } |
| 81 | 86 |
| 82 bool operator>(const GridResolvedPosition& other) const | 87 bool operator>(const GridResolvedPosition& other) const |
| 83 { | 88 { |
| 84 return m_integerPosition > other.m_integerPosition; | 89 return m_integerPosition > other.m_integerPosition; |
| 85 } | 90 } |
| 86 | 91 |
| 87 bool operator<=(const GridResolvedPosition& other) const | 92 bool operator<=(const GridResolvedPosition& other) const |
| 88 { | 93 { |
| 89 return m_integerPosition <= other.m_integerPosition; | 94 return m_integerPosition <= other.m_integerPosition; |
| 90 } | 95 } |
| 91 | 96 |
| 92 bool operator>=(const GridResolvedPosition& other) const | 97 bool operator>=(const GridResolvedPosition& other) const |
| 93 { | 98 { |
| 94 return m_integerPosition >= other.m_integerPosition; | 99 return m_integerPosition >= other.m_integerPosition; |
| 95 } | 100 } |
| 96 | 101 |
| 97 size_t toInt() const | 102 size_t toInt() const |
| 98 { | 103 { |
| 99 return m_integerPosition; | 104 return m_integerPosition; |
| 100 } | 105 } |
| 101 | 106 |
| 107 GridResolvedPosition next() const |
| 108 { |
| 109 return GridResolvedPosition(m_integerPosition + 1); |
| 110 } |
| 111 |
| 102 static size_t explicitGridColumnCount(const RenderStyle&); | 112 static size_t explicitGridColumnCount(const RenderStyle&); |
| 103 static size_t explicitGridRowCount(const RenderStyle&); | 113 static size_t explicitGridRowCount(const RenderStyle&); |
| 104 | 114 |
| 105 private: | 115 private: |
| 106 | 116 |
| 107 static size_t explicitGridSizeForSide(const RenderStyle&, GridPositionSide); | 117 static size_t explicitGridSizeForSide(const RenderStyle&, GridPositionSide); |
| 108 | 118 |
| 109 size_t m_integerPosition; | 119 size_t m_integerPosition; |
| 110 }; | 120 }; |
| 111 | 121 |
| 112 } // namespace WebCore | 122 } // namespace WebCore |
| 113 | 123 |
| 114 #endif // GridResolvedPosition_h | 124 #endif // GridResolvedPosition_h |
| OLD | NEW |