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 #include "GridPositionsResolver.h" | 5 #include "GridPositionsResolver.h" |
6 | 6 |
| 7 #include <algorithm> |
7 #include "core/layout/LayoutBox.h" | 8 #include "core/layout/LayoutBox.h" |
8 #include "core/style/GridArea.h" | 9 #include "core/style/GridArea.h" |
9 #include <algorithm> | |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 static inline GridTrackSizingDirection DirectionFromSide( | 13 static inline GridTrackSizingDirection DirectionFromSide( |
14 GridPositionSide side) { | 14 GridPositionSide side) { |
15 return side == kColumnStartSide || side == kColumnEndSide ? kForColumns | 15 return side == kColumnStartSide || side == kColumnEndSide ? kForColumns |
16 : kForRows; | 16 : kForRows; |
17 } | 17 } |
18 | 18 |
19 static inline String ImplicitNamedGridLineForSide(const String& line_name, | 19 static inline String ImplicitNamedGridLineForSide(const String& line_name, |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 | 524 |
525 if (end_line < start_line) | 525 if (end_line < start_line) |
526 std::swap(end_line, start_line); | 526 std::swap(end_line, start_line); |
527 else if (end_line == start_line) | 527 else if (end_line == start_line) |
528 end_line = start_line + 1; | 528 end_line = start_line + 1; |
529 | 529 |
530 return GridSpan::UntranslatedDefiniteGridSpan(start_line, end_line); | 530 return GridSpan::UntranslatedDefiniteGridSpan(start_line, end_line); |
531 } | 531 } |
532 | 532 |
533 } // namespace blink | 533 } // namespace blink |
OLD | NEW |