OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 ASSERT(resolvedInitialPosition <= resolvedFinalPosition); | 110 ASSERT(resolvedInitialPosition <= resolvedFinalPosition); |
111 } | 111 } |
112 | 112 |
113 bool operator==(const GridSpan& o) const | 113 bool operator==(const GridSpan& o) const |
114 { | 114 { |
115 return resolvedInitialPosition == o.resolvedInitialPosition && resolvedF
inalPosition == o.resolvedFinalPosition; | 115 return resolvedInitialPosition == o.resolvedInitialPosition && resolvedF
inalPosition == o.resolvedFinalPosition; |
116 } | 116 } |
117 | 117 |
118 GridResolvedPosition resolvedInitialPosition; | 118 GridResolvedPosition resolvedInitialPosition; |
119 GridResolvedPosition resolvedFinalPosition; | 119 GridResolvedPosition resolvedFinalPosition; |
| 120 |
| 121 typedef GridResolvedPosition iterator; |
| 122 |
| 123 iterator begin() const |
| 124 { |
| 125 return resolvedInitialPosition; |
| 126 } |
| 127 |
| 128 iterator end() const |
| 129 { |
| 130 return resolvedFinalPosition.next(); |
| 131 } |
120 }; | 132 }; |
121 | 133 |
122 // This represents a grid area that spans in both rows' and columns' direction. | 134 // This represents a grid area that spans in both rows' and columns' direction. |
123 struct GridCoordinate { | 135 struct GridCoordinate { |
124 // HashMap requires a default constuctor. | 136 // HashMap requires a default constuctor. |
125 GridCoordinate() | 137 GridCoordinate() |
126 : columns(0, 0) | 138 : columns(0, 0) |
127 , rows(0, 0) | 139 , rows(0, 0) |
128 { | 140 { |
129 } | 141 } |
(...skipping 16 matching lines...) Expand all Loading... |
146 | 158 |
147 GridSpan columns; | 159 GridSpan columns; |
148 GridSpan rows; | 160 GridSpan rows; |
149 }; | 161 }; |
150 | 162 |
151 typedef HashMap<String, GridCoordinate> NamedGridAreaMap; | 163 typedef HashMap<String, GridCoordinate> NamedGridAreaMap; |
152 | 164 |
153 } // namespace WebCore | 165 } // namespace WebCore |
154 | 166 |
155 #endif // GridCoordinate_h | 167 #endif // GridCoordinate_h |
OLD | NEW |