| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 , resolvedFinalPosition(resolvedFinalPosition) | 107 , resolvedFinalPosition(resolvedFinalPosition) |
| 108 { | 108 { |
| 109 ASSERT(resolvedInitialPosition <= resolvedFinalPosition); | 109 ASSERT(resolvedInitialPosition <= resolvedFinalPosition); |
| 110 } | 110 } |
| 111 | 111 |
| 112 bool operator==(const GridSpan& o) const | 112 bool operator==(const GridSpan& o) const |
| 113 { | 113 { |
| 114 return resolvedInitialPosition == o.resolvedInitialPosition && resolvedF
inalPosition == o.resolvedFinalPosition; | 114 return resolvedInitialPosition == o.resolvedInitialPosition && resolvedF
inalPosition == o.resolvedFinalPosition; |
| 115 } | 115 } |
| 116 | 116 |
| 117 size_t integerSpan() const |
| 118 { |
| 119 return resolvedFinalPosition.toInt() - resolvedInitialPosition.toInt() +
1; |
| 120 } |
| 121 |
| 117 GridResolvedPosition resolvedInitialPosition; | 122 GridResolvedPosition resolvedInitialPosition; |
| 118 GridResolvedPosition resolvedFinalPosition; | 123 GridResolvedPosition resolvedFinalPosition; |
| 119 | 124 |
| 120 typedef GridResolvedPosition iterator; | 125 typedef GridResolvedPosition iterator; |
| 121 | 126 |
| 122 iterator begin() const | 127 iterator begin() const |
| 123 { | 128 { |
| 124 return resolvedInitialPosition; | 129 return resolvedInitialPosition; |
| 125 } | 130 } |
| 126 | 131 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 178 |
| 174 GridSpan columns; | 179 GridSpan columns; |
| 175 GridSpan rows; | 180 GridSpan rows; |
| 176 }; | 181 }; |
| 177 | 182 |
| 178 typedef HashMap<String, GridCoordinate> NamedGridAreaMap; | 183 typedef HashMap<String, GridCoordinate> NamedGridAreaMap; |
| 179 | 184 |
| 180 } // namespace WebCore | 185 } // namespace WebCore |
| 181 | 186 |
| 182 #endif // GridCoordinate_h | 187 #endif // GridCoordinate_h |
| OLD | NEW |